aws_sdk_secretsmanager/operation/delete_secret/
_delete_secret_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteSecretOutput {
6    /// <p>The ARN of the secret.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the secret.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time after which this secret Secrets Manager can permanently delete this secret, and it can no longer be restored. This value is the date and time of the delete request plus the number of days in <code>RecoveryWindowInDays</code>.</p>
11    pub deletion_date: ::std::option::Option<::aws_smithy_types::DateTime>,
12    _request_id: Option<String>,
13}
14impl DeleteSecretOutput {
15    /// <p>The ARN of the secret.</p>
16    pub fn arn(&self) -> ::std::option::Option<&str> {
17        self.arn.as_deref()
18    }
19    /// <p>The name of the secret.</p>
20    pub fn name(&self) -> ::std::option::Option<&str> {
21        self.name.as_deref()
22    }
23    /// <p>The date and time after which this secret Secrets Manager can permanently delete this secret, and it can no longer be restored. This value is the date and time of the delete request plus the number of days in <code>RecoveryWindowInDays</code>.</p>
24    pub fn deletion_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
25        self.deletion_date.as_ref()
26    }
27}
28impl ::aws_types::request_id::RequestId for DeleteSecretOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl DeleteSecretOutput {
34    /// Creates a new builder-style object to manufacture [`DeleteSecretOutput`](crate::operation::delete_secret::DeleteSecretOutput).
35    pub fn builder() -> crate::operation::delete_secret::builders::DeleteSecretOutputBuilder {
36        crate::operation::delete_secret::builders::DeleteSecretOutputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteSecretOutput`](crate::operation::delete_secret::DeleteSecretOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteSecretOutputBuilder {
44    pub(crate) arn: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) deletion_date: ::std::option::Option<::aws_smithy_types::DateTime>,
47    _request_id: Option<String>,
48}
49impl DeleteSecretOutputBuilder {
50    /// <p>The ARN of the secret.</p>
51    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.arn = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ARN of the secret.</p>
56    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.arn = input;
58        self
59    }
60    /// <p>The ARN of the secret.</p>
61    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
62        &self.arn
63    }
64    /// <p>The name of the secret.</p>
65    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.name = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The name of the secret.</p>
70    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.name = input;
72        self
73    }
74    /// <p>The name of the secret.</p>
75    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
76        &self.name
77    }
78    /// <p>The date and time after which this secret Secrets Manager can permanently delete this secret, and it can no longer be restored. This value is the date and time of the delete request plus the number of days in <code>RecoveryWindowInDays</code>.</p>
79    pub fn deletion_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
80        self.deletion_date = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The date and time after which this secret Secrets Manager can permanently delete this secret, and it can no longer be restored. This value is the date and time of the delete request plus the number of days in <code>RecoveryWindowInDays</code>.</p>
84    pub fn set_deletion_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
85        self.deletion_date = input;
86        self
87    }
88    /// <p>The date and time after which this secret Secrets Manager can permanently delete this secret, and it can no longer be restored. This value is the date and time of the delete request plus the number of days in <code>RecoveryWindowInDays</code>.</p>
89    pub fn get_deletion_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
90        &self.deletion_date
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`DeleteSecretOutput`](crate::operation::delete_secret::DeleteSecretOutput).
102    pub fn build(self) -> crate::operation::delete_secret::DeleteSecretOutput {
103        crate::operation::delete_secret::DeleteSecretOutput {
104            arn: self.arn,
105            name: self.name,
106            deletion_date: self.deletion_date,
107            _request_id: self._request_id,
108        }
109    }
110}