aws_sdk_snowball/operation/update_cluster/
_update_cluster_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 UpdateClusterInput {
6    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
7    pub cluster_id: ::std::option::Option<::std::string::String>,
8    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
9    pub role_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The updated description of this cluster.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The updated arrays of <code>JobResource</code> objects that can include updated <code>S3Resource</code> objects or <code>LambdaResource</code> objects.</p>
13    pub resources: ::std::option::Option<crate::types::JobResource>,
14    /// <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).</p>
15    pub on_device_service_configuration: ::std::option::Option<crate::types::OnDeviceServiceConfiguration>,
16    /// <p>The ID of the updated <code>Address</code> object.</p>
17    pub address_id: ::std::option::Option<::std::string::String>,
18    /// <p>The updated shipping option value of this cluster's <code>ShippingDetails</code> object.</p>
19    pub shipping_option: ::std::option::Option<crate::types::ShippingOption>,
20    /// <p>The new or updated <code>Notification</code> object.</p>
21    pub notification: ::std::option::Option<crate::types::Notification>,
22    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
23    pub forwarding_address_id: ::std::option::Option<::std::string::String>,
24}
25impl UpdateClusterInput {
26    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
27    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
28        self.cluster_id.as_deref()
29    }
30    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
31    pub fn role_arn(&self) -> ::std::option::Option<&str> {
32        self.role_arn.as_deref()
33    }
34    /// <p>The updated description of this cluster.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The updated arrays of <code>JobResource</code> objects that can include updated <code>S3Resource</code> objects or <code>LambdaResource</code> objects.</p>
39    pub fn resources(&self) -> ::std::option::Option<&crate::types::JobResource> {
40        self.resources.as_ref()
41    }
42    /// <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).</p>
43    pub fn on_device_service_configuration(&self) -> ::std::option::Option<&crate::types::OnDeviceServiceConfiguration> {
44        self.on_device_service_configuration.as_ref()
45    }
46    /// <p>The ID of the updated <code>Address</code> object.</p>
47    pub fn address_id(&self) -> ::std::option::Option<&str> {
48        self.address_id.as_deref()
49    }
50    /// <p>The updated shipping option value of this cluster's <code>ShippingDetails</code> object.</p>
51    pub fn shipping_option(&self) -> ::std::option::Option<&crate::types::ShippingOption> {
52        self.shipping_option.as_ref()
53    }
54    /// <p>The new or updated <code>Notification</code> object.</p>
55    pub fn notification(&self) -> ::std::option::Option<&crate::types::Notification> {
56        self.notification.as_ref()
57    }
58    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
59    pub fn forwarding_address_id(&self) -> ::std::option::Option<&str> {
60        self.forwarding_address_id.as_deref()
61    }
62}
63impl UpdateClusterInput {
64    /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
65    pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
66        crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
67    }
68}
69
70/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct UpdateClusterInputBuilder {
74    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
75    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) description: ::std::option::Option<::std::string::String>,
77    pub(crate) resources: ::std::option::Option<crate::types::JobResource>,
78    pub(crate) on_device_service_configuration: ::std::option::Option<crate::types::OnDeviceServiceConfiguration>,
79    pub(crate) address_id: ::std::option::Option<::std::string::String>,
80    pub(crate) shipping_option: ::std::option::Option<crate::types::ShippingOption>,
81    pub(crate) notification: ::std::option::Option<crate::types::Notification>,
82    pub(crate) forwarding_address_id: ::std::option::Option<::std::string::String>,
83}
84impl UpdateClusterInputBuilder {
85    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
86    /// This field is required.
87    pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.cluster_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
92    pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.cluster_id = input;
94        self
95    }
96    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
97    pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.cluster_id
99    }
100    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
101    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.role_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
106    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.role_arn = input;
108        self
109    }
110    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in Identity and Access Management (IAM).</p>
111    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.role_arn
113    }
114    /// <p>The updated description of this cluster.</p>
115    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.description = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The updated description of this cluster.</p>
120    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.description = input;
122        self
123    }
124    /// <p>The updated description of this cluster.</p>
125    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126        &self.description
127    }
128    /// <p>The updated arrays of <code>JobResource</code> objects that can include updated <code>S3Resource</code> objects or <code>LambdaResource</code> objects.</p>
129    pub fn resources(mut self, input: crate::types::JobResource) -> Self {
130        self.resources = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The updated arrays of <code>JobResource</code> objects that can include updated <code>S3Resource</code> objects or <code>LambdaResource</code> objects.</p>
134    pub fn set_resources(mut self, input: ::std::option::Option<crate::types::JobResource>) -> Self {
135        self.resources = input;
136        self
137    }
138    /// <p>The updated arrays of <code>JobResource</code> objects that can include updated <code>S3Resource</code> objects or <code>LambdaResource</code> objects.</p>
139    pub fn get_resources(&self) -> &::std::option::Option<crate::types::JobResource> {
140        &self.resources
141    }
142    /// <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).</p>
143    pub fn on_device_service_configuration(mut self, input: crate::types::OnDeviceServiceConfiguration) -> Self {
144        self.on_device_service_configuration = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).</p>
148    pub fn set_on_device_service_configuration(mut self, input: ::std::option::Option<crate::types::OnDeviceServiceConfiguration>) -> Self {
149        self.on_device_service_configuration = input;
150        self
151    }
152    /// <p>Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).</p>
153    pub fn get_on_device_service_configuration(&self) -> &::std::option::Option<crate::types::OnDeviceServiceConfiguration> {
154        &self.on_device_service_configuration
155    }
156    /// <p>The ID of the updated <code>Address</code> object.</p>
157    pub fn address_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.address_id = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The ID of the updated <code>Address</code> object.</p>
162    pub fn set_address_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.address_id = input;
164        self
165    }
166    /// <p>The ID of the updated <code>Address</code> object.</p>
167    pub fn get_address_id(&self) -> &::std::option::Option<::std::string::String> {
168        &self.address_id
169    }
170    /// <p>The updated shipping option value of this cluster's <code>ShippingDetails</code> object.</p>
171    pub fn shipping_option(mut self, input: crate::types::ShippingOption) -> Self {
172        self.shipping_option = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>The updated shipping option value of this cluster's <code>ShippingDetails</code> object.</p>
176    pub fn set_shipping_option(mut self, input: ::std::option::Option<crate::types::ShippingOption>) -> Self {
177        self.shipping_option = input;
178        self
179    }
180    /// <p>The updated shipping option value of this cluster's <code>ShippingDetails</code> object.</p>
181    pub fn get_shipping_option(&self) -> &::std::option::Option<crate::types::ShippingOption> {
182        &self.shipping_option
183    }
184    /// <p>The new or updated <code>Notification</code> object.</p>
185    pub fn notification(mut self, input: crate::types::Notification) -> Self {
186        self.notification = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>The new or updated <code>Notification</code> object.</p>
190    pub fn set_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
191        self.notification = input;
192        self
193    }
194    /// <p>The new or updated <code>Notification</code> object.</p>
195    pub fn get_notification(&self) -> &::std::option::Option<crate::types::Notification> {
196        &self.notification
197    }
198    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
199    pub fn forwarding_address_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.forwarding_address_id = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
204    pub fn set_forwarding_address_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.forwarding_address_id = input;
206        self
207    }
208    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
209    pub fn get_forwarding_address_id(&self) -> &::std::option::Option<::std::string::String> {
210        &self.forwarding_address_id
211    }
212    /// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
213    pub fn build(
214        self,
215    ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
216        ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
217            cluster_id: self.cluster_id,
218            role_arn: self.role_arn,
219            description: self.description,
220            resources: self.resources,
221            on_device_service_configuration: self.on_device_service_configuration,
222            address_id: self.address_id,
223            shipping_option: self.shipping_option,
224            notification: self.notification,
225            forwarding_address_id: self.forwarding_address_id,
226        })
227    }
228}