aws_sdk_datazone/operation/update_domain/
_update_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 UpdateDomainInput {
6    /// <p>The ID of the Amazon Web Services domain that is to be updated.</p>
7    pub identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
11    pub single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
12    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
13    pub domain_execution_role: ::std::option::Option<::std::string::String>,
14    /// <p>The service role of the domain.</p>
15    pub service_role: ::std::option::Option<::std::string::String>,
16    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
17    pub name: ::std::option::Option<::std::string::String>,
18    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
19    pub client_token: ::std::option::Option<::std::string::String>,
20}
21impl UpdateDomainInput {
22    /// <p>The ID of the Amazon Web Services domain that is to be updated.</p>
23    pub fn identifier(&self) -> ::std::option::Option<&str> {
24        self.identifier.as_deref()
25    }
26    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
31    pub fn single_sign_on(&self) -> ::std::option::Option<&crate::types::SingleSignOn> {
32        self.single_sign_on.as_ref()
33    }
34    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
35    pub fn domain_execution_role(&self) -> ::std::option::Option<&str> {
36        self.domain_execution_role.as_deref()
37    }
38    /// <p>The service role of the domain.</p>
39    pub fn service_role(&self) -> ::std::option::Option<&str> {
40        self.service_role.as_deref()
41    }
42    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
43    pub fn name(&self) -> ::std::option::Option<&str> {
44        self.name.as_deref()
45    }
46    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
47    pub fn client_token(&self) -> ::std::option::Option<&str> {
48        self.client_token.as_deref()
49    }
50}
51impl UpdateDomainInput {
52    /// Creates a new builder-style object to manufacture [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
53    pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainInputBuilder {
54        crate::operation::update_domain::builders::UpdateDomainInputBuilder::default()
55    }
56}
57
58/// A builder for [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdateDomainInputBuilder {
62    pub(crate) identifier: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
65    pub(crate) domain_execution_role: ::std::option::Option<::std::string::String>,
66    pub(crate) service_role: ::std::option::Option<::std::string::String>,
67    pub(crate) name: ::std::option::Option<::std::string::String>,
68    pub(crate) client_token: ::std::option::Option<::std::string::String>,
69}
70impl UpdateDomainInputBuilder {
71    /// <p>The ID of the Amazon Web Services domain that is to be updated.</p>
72    /// This field is required.
73    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.identifier = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ID of the Amazon Web Services domain that is to be updated.</p>
78    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.identifier = input;
80        self
81    }
82    /// <p>The ID of the Amazon Web Services domain that is to be updated.</p>
83    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
84        &self.identifier
85    }
86    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
87    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.description = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
92    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.description = input;
94        self
95    }
96    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
97    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
98        &self.description
99    }
100    /// <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
101    pub fn single_sign_on(mut self, input: crate::types::SingleSignOn) -> Self {
102        self.single_sign_on = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
106    pub fn set_single_sign_on(mut self, input: ::std::option::Option<crate::types::SingleSignOn>) -> Self {
107        self.single_sign_on = input;
108        self
109    }
110    /// <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
111    pub fn get_single_sign_on(&self) -> &::std::option::Option<crate::types::SingleSignOn> {
112        &self.single_sign_on
113    }
114    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
115    pub fn domain_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.domain_execution_role = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
120    pub fn set_domain_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.domain_execution_role = input;
122        self
123    }
124    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
125    pub fn get_domain_execution_role(&self) -> &::std::option::Option<::std::string::String> {
126        &self.domain_execution_role
127    }
128    /// <p>The service role of the domain.</p>
129    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.service_role = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The service role of the domain.</p>
134    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.service_role = input;
136        self
137    }
138    /// <p>The service role of the domain.</p>
139    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
140        &self.service_role
141    }
142    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
143    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.name = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
148    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.name = input;
150        self
151    }
152    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
153    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
154        &self.name
155    }
156    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
157    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.client_token = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
162    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.client_token = input;
164        self
165    }
166    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
167    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
168        &self.client_token
169    }
170    /// Consumes the builder and constructs a [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
171    pub fn build(
172        self,
173    ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
174        ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainInput {
175            identifier: self.identifier,
176            description: self.description,
177            single_sign_on: self.single_sign_on,
178            domain_execution_role: self.domain_execution_role,
179            service_role: self.service_role,
180            name: self.name,
181            client_token: self.client_token,
182        })
183    }
184}