aws_sdk_sagemaker/operation/delete_domain/
_delete_domain_input.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 DeleteDomainInput {
6    /// <p>The domain ID.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).</p>
9    pub retention_policy: ::std::option::Option<crate::types::RetentionPolicy>,
10}
11impl DeleteDomainInput {
12    /// <p>The domain ID.</p>
13    pub fn domain_id(&self) -> ::std::option::Option<&str> {
14        self.domain_id.as_deref()
15    }
16    /// <p>The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).</p>
17    pub fn retention_policy(&self) -> ::std::option::Option<&crate::types::RetentionPolicy> {
18        self.retention_policy.as_ref()
19    }
20}
21impl DeleteDomainInput {
22    /// Creates a new builder-style object to manufacture [`DeleteDomainInput`](crate::operation::delete_domain::DeleteDomainInput).
23    pub fn builder() -> crate::operation::delete_domain::builders::DeleteDomainInputBuilder {
24        crate::operation::delete_domain::builders::DeleteDomainInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteDomainInput`](crate::operation::delete_domain::DeleteDomainInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteDomainInputBuilder {
32    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
33    pub(crate) retention_policy: ::std::option::Option<crate::types::RetentionPolicy>,
34}
35impl DeleteDomainInputBuilder {
36    /// <p>The domain ID.</p>
37    /// This field is required.
38    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.domain_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The domain ID.</p>
43    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.domain_id = input;
45        self
46    }
47    /// <p>The domain ID.</p>
48    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.domain_id
50    }
51    /// <p>The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).</p>
52    pub fn retention_policy(mut self, input: crate::types::RetentionPolicy) -> Self {
53        self.retention_policy = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).</p>
57    pub fn set_retention_policy(mut self, input: ::std::option::Option<crate::types::RetentionPolicy>) -> Self {
58        self.retention_policy = input;
59        self
60    }
61    /// <p>The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).</p>
62    pub fn get_retention_policy(&self) -> &::std::option::Option<crate::types::RetentionPolicy> {
63        &self.retention_policy
64    }
65    /// Consumes the builder and constructs a [`DeleteDomainInput`](crate::operation::delete_domain::DeleteDomainInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::delete_domain::DeleteDomainInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::delete_domain::DeleteDomainInput {
70            domain_id: self.domain_id,
71            retention_policy: self.retention_policy,
72        })
73    }
74}