aws_sdk_datazone/operation/update_data_source/
_update_data_source_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)]
5pub struct UpdateDataSourceInput {
6    /// <p>The identifier of the domain in which to update a data source.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the data source to be updated.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
15    pub enable_setting: ::std::option::Option<crate::types::EnableSetting>,
16    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
17    pub publish_on_import: ::std::option::Option<bool>,
18    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
19    pub asset_forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
20    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
21    pub schedule: ::std::option::Option<crate::types::ScheduleConfiguration>,
22    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
23    pub configuration: ::std::option::Option<crate::types::DataSourceConfigurationInput>,
24    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
25    pub recommendation: ::std::option::Option<crate::types::RecommendationConfiguration>,
26    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
27    pub retain_permissions_on_revoke_failure: ::std::option::Option<bool>,
28}
29impl UpdateDataSourceInput {
30    /// <p>The identifier of the domain in which to update a data source.</p>
31    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
32        self.domain_identifier.as_deref()
33    }
34    /// <p>The identifier of the data source to be updated.</p>
35    pub fn identifier(&self) -> ::std::option::Option<&str> {
36        self.identifier.as_deref()
37    }
38    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
39    pub fn name(&self) -> ::std::option::Option<&str> {
40        self.name.as_deref()
41    }
42    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
43    pub fn description(&self) -> ::std::option::Option<&str> {
44        self.description.as_deref()
45    }
46    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
47    pub fn enable_setting(&self) -> ::std::option::Option<&crate::types::EnableSetting> {
48        self.enable_setting.as_ref()
49    }
50    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
51    pub fn publish_on_import(&self) -> ::std::option::Option<bool> {
52        self.publish_on_import
53    }
54    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
55    ///
56    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.asset_forms_input.is_none()`.
57    pub fn asset_forms_input(&self) -> &[crate::types::FormInput] {
58        self.asset_forms_input.as_deref().unwrap_or_default()
59    }
60    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
61    pub fn schedule(&self) -> ::std::option::Option<&crate::types::ScheduleConfiguration> {
62        self.schedule.as_ref()
63    }
64    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
65    pub fn configuration(&self) -> ::std::option::Option<&crate::types::DataSourceConfigurationInput> {
66        self.configuration.as_ref()
67    }
68    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
69    pub fn recommendation(&self) -> ::std::option::Option<&crate::types::RecommendationConfiguration> {
70        self.recommendation.as_ref()
71    }
72    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
73    pub fn retain_permissions_on_revoke_failure(&self) -> ::std::option::Option<bool> {
74        self.retain_permissions_on_revoke_failure
75    }
76}
77impl ::std::fmt::Debug for UpdateDataSourceInput {
78    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
79        let mut formatter = f.debug_struct("UpdateDataSourceInput");
80        formatter.field("domain_identifier", &self.domain_identifier);
81        formatter.field("identifier", &self.identifier);
82        formatter.field("name", &"*** Sensitive Data Redacted ***");
83        formatter.field("description", &"*** Sensitive Data Redacted ***");
84        formatter.field("enable_setting", &self.enable_setting);
85        formatter.field("publish_on_import", &self.publish_on_import);
86        formatter.field("asset_forms_input", &"*** Sensitive Data Redacted ***");
87        formatter.field("schedule", &"*** Sensitive Data Redacted ***");
88        formatter.field("configuration", &self.configuration);
89        formatter.field("recommendation", &self.recommendation);
90        formatter.field("retain_permissions_on_revoke_failure", &self.retain_permissions_on_revoke_failure);
91        formatter.finish()
92    }
93}
94impl UpdateDataSourceInput {
95    /// Creates a new builder-style object to manufacture [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
96    pub fn builder() -> crate::operation::update_data_source::builders::UpdateDataSourceInputBuilder {
97        crate::operation::update_data_source::builders::UpdateDataSourceInputBuilder::default()
98    }
99}
100
101/// A builder for [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
102#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
103#[non_exhaustive]
104pub struct UpdateDataSourceInputBuilder {
105    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
106    pub(crate) identifier: ::std::option::Option<::std::string::String>,
107    pub(crate) name: ::std::option::Option<::std::string::String>,
108    pub(crate) description: ::std::option::Option<::std::string::String>,
109    pub(crate) enable_setting: ::std::option::Option<crate::types::EnableSetting>,
110    pub(crate) publish_on_import: ::std::option::Option<bool>,
111    pub(crate) asset_forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
112    pub(crate) schedule: ::std::option::Option<crate::types::ScheduleConfiguration>,
113    pub(crate) configuration: ::std::option::Option<crate::types::DataSourceConfigurationInput>,
114    pub(crate) recommendation: ::std::option::Option<crate::types::RecommendationConfiguration>,
115    pub(crate) retain_permissions_on_revoke_failure: ::std::option::Option<bool>,
116}
117impl UpdateDataSourceInputBuilder {
118    /// <p>The identifier of the domain in which to update a data source.</p>
119    /// This field is required.
120    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.domain_identifier = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The identifier of the domain in which to update a data source.</p>
125    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.domain_identifier = input;
127        self
128    }
129    /// <p>The identifier of the domain in which to update a data source.</p>
130    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
131        &self.domain_identifier
132    }
133    /// <p>The identifier of the data source to be updated.</p>
134    /// This field is required.
135    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.identifier = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The identifier of the data source to be updated.</p>
140    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.identifier = input;
142        self
143    }
144    /// <p>The identifier of the data source to be updated.</p>
145    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
146        &self.identifier
147    }
148    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
149    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.name = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
154    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.name = input;
156        self
157    }
158    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
159    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
160        &self.name
161    }
162    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
163    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.description = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
168    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.description = input;
170        self
171    }
172    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
173    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
174        &self.description
175    }
176    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
177    pub fn enable_setting(mut self, input: crate::types::EnableSetting) -> Self {
178        self.enable_setting = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
182    pub fn set_enable_setting(mut self, input: ::std::option::Option<crate::types::EnableSetting>) -> Self {
183        self.enable_setting = input;
184        self
185    }
186    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
187    pub fn get_enable_setting(&self) -> &::std::option::Option<crate::types::EnableSetting> {
188        &self.enable_setting
189    }
190    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
191    pub fn publish_on_import(mut self, input: bool) -> Self {
192        self.publish_on_import = ::std::option::Option::Some(input);
193        self
194    }
195    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
196    pub fn set_publish_on_import(mut self, input: ::std::option::Option<bool>) -> Self {
197        self.publish_on_import = input;
198        self
199    }
200    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
201    pub fn get_publish_on_import(&self) -> &::std::option::Option<bool> {
202        &self.publish_on_import
203    }
204    /// Appends an item to `asset_forms_input`.
205    ///
206    /// To override the contents of this collection use [`set_asset_forms_input`](Self::set_asset_forms_input).
207    ///
208    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
209    pub fn asset_forms_input(mut self, input: crate::types::FormInput) -> Self {
210        let mut v = self.asset_forms_input.unwrap_or_default();
211        v.push(input);
212        self.asset_forms_input = ::std::option::Option::Some(v);
213        self
214    }
215    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
216    pub fn set_asset_forms_input(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>) -> Self {
217        self.asset_forms_input = input;
218        self
219    }
220    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
221    pub fn get_asset_forms_input(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormInput>> {
222        &self.asset_forms_input
223    }
224    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
225    pub fn schedule(mut self, input: crate::types::ScheduleConfiguration) -> Self {
226        self.schedule = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
230    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::ScheduleConfiguration>) -> Self {
231        self.schedule = input;
232        self
233    }
234    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
235    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::ScheduleConfiguration> {
236        &self.schedule
237    }
238    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
239    pub fn configuration(mut self, input: crate::types::DataSourceConfigurationInput) -> Self {
240        self.configuration = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
244    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::DataSourceConfigurationInput>) -> Self {
245        self.configuration = input;
246        self
247    }
248    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
249    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::DataSourceConfigurationInput> {
250        &self.configuration
251    }
252    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
253    pub fn recommendation(mut self, input: crate::types::RecommendationConfiguration) -> Self {
254        self.recommendation = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
258    pub fn set_recommendation(mut self, input: ::std::option::Option<crate::types::RecommendationConfiguration>) -> Self {
259        self.recommendation = input;
260        self
261    }
262    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
263    pub fn get_recommendation(&self) -> &::std::option::Option<crate::types::RecommendationConfiguration> {
264        &self.recommendation
265    }
266    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
267    pub fn retain_permissions_on_revoke_failure(mut self, input: bool) -> Self {
268        self.retain_permissions_on_revoke_failure = ::std::option::Option::Some(input);
269        self
270    }
271    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
272    pub fn set_retain_permissions_on_revoke_failure(mut self, input: ::std::option::Option<bool>) -> Self {
273        self.retain_permissions_on_revoke_failure = input;
274        self
275    }
276    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
277    pub fn get_retain_permissions_on_revoke_failure(&self) -> &::std::option::Option<bool> {
278        &self.retain_permissions_on_revoke_failure
279    }
280    /// Consumes the builder and constructs a [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
281    pub fn build(
282        self,
283    ) -> ::std::result::Result<crate::operation::update_data_source::UpdateDataSourceInput, ::aws_smithy_types::error::operation::BuildError> {
284        ::std::result::Result::Ok(crate::operation::update_data_source::UpdateDataSourceInput {
285            domain_identifier: self.domain_identifier,
286            identifier: self.identifier,
287            name: self.name,
288            description: self.description,
289            enable_setting: self.enable_setting,
290            publish_on_import: self.publish_on_import,
291            asset_forms_input: self.asset_forms_input,
292            schedule: self.schedule,
293            configuration: self.configuration,
294            recommendation: self.recommendation,
295            retain_permissions_on_revoke_failure: self.retain_permissions_on_revoke_failure,
296        })
297    }
298}
299impl ::std::fmt::Debug for UpdateDataSourceInputBuilder {
300    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
301        let mut formatter = f.debug_struct("UpdateDataSourceInputBuilder");
302        formatter.field("domain_identifier", &self.domain_identifier);
303        formatter.field("identifier", &self.identifier);
304        formatter.field("name", &"*** Sensitive Data Redacted ***");
305        formatter.field("description", &"*** Sensitive Data Redacted ***");
306        formatter.field("enable_setting", &self.enable_setting);
307        formatter.field("publish_on_import", &self.publish_on_import);
308        formatter.field("asset_forms_input", &"*** Sensitive Data Redacted ***");
309        formatter.field("schedule", &"*** Sensitive Data Redacted ***");
310        formatter.field("configuration", &self.configuration);
311        formatter.field("recommendation", &self.recommendation);
312        formatter.field("retain_permissions_on_revoke_failure", &self.retain_permissions_on_revoke_failure);
313        formatter.finish()
314    }
315}