aws_sdk_fsx/operation/update_volume/
_update_volume_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 UpdateVolumeInput {
6    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
7    pub client_request_token: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the volume that you want to update, in the format <code>fsvol-0123456789abcdef0</code>.</p>
9    pub volume_id: ::std::option::Option<::std::string::String>,
10    /// <p>The configuration of the ONTAP volume that you are updating.</p>
11    pub ontap_configuration: ::std::option::Option<crate::types::UpdateOntapVolumeConfiguration>,
12    /// <p>The name of the OpenZFS volume. OpenZFS root volumes are automatically named <code>FSX</code>. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The configuration of the OpenZFS volume that you are updating.</p>
15    pub open_zfs_configuration: ::std::option::Option<crate::types::UpdateOpenZfsVolumeConfiguration>,
16}
17impl UpdateVolumeInput {
18    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
19    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
20        self.client_request_token.as_deref()
21    }
22    /// <p>The ID of the volume that you want to update, in the format <code>fsvol-0123456789abcdef0</code>.</p>
23    pub fn volume_id(&self) -> ::std::option::Option<&str> {
24        self.volume_id.as_deref()
25    }
26    /// <p>The configuration of the ONTAP volume that you are updating.</p>
27    pub fn ontap_configuration(&self) -> ::std::option::Option<&crate::types::UpdateOntapVolumeConfiguration> {
28        self.ontap_configuration.as_ref()
29    }
30    /// <p>The name of the OpenZFS volume. OpenZFS root volumes are automatically named <code>FSX</code>. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The configuration of the OpenZFS volume that you are updating.</p>
35    pub fn open_zfs_configuration(&self) -> ::std::option::Option<&crate::types::UpdateOpenZfsVolumeConfiguration> {
36        self.open_zfs_configuration.as_ref()
37    }
38}
39impl UpdateVolumeInput {
40    /// Creates a new builder-style object to manufacture [`UpdateVolumeInput`](crate::operation::update_volume::UpdateVolumeInput).
41    pub fn builder() -> crate::operation::update_volume::builders::UpdateVolumeInputBuilder {
42        crate::operation::update_volume::builders::UpdateVolumeInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateVolumeInput`](crate::operation::update_volume::UpdateVolumeInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateVolumeInputBuilder {
50    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
51    pub(crate) volume_id: ::std::option::Option<::std::string::String>,
52    pub(crate) ontap_configuration: ::std::option::Option<crate::types::UpdateOntapVolumeConfiguration>,
53    pub(crate) name: ::std::option::Option<::std::string::String>,
54    pub(crate) open_zfs_configuration: ::std::option::Option<crate::types::UpdateOpenZfsVolumeConfiguration>,
55}
56impl UpdateVolumeInputBuilder {
57    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
58    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.client_request_token = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
63    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.client_request_token = input;
65        self
66    }
67    /// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
68    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
69        &self.client_request_token
70    }
71    /// <p>The ID of the volume that you want to update, in the format <code>fsvol-0123456789abcdef0</code>.</p>
72    /// This field is required.
73    pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.volume_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ID of the volume that you want to update, in the format <code>fsvol-0123456789abcdef0</code>.</p>
78    pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.volume_id = input;
80        self
81    }
82    /// <p>The ID of the volume that you want to update, in the format <code>fsvol-0123456789abcdef0</code>.</p>
83    pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.volume_id
85    }
86    /// <p>The configuration of the ONTAP volume that you are updating.</p>
87    pub fn ontap_configuration(mut self, input: crate::types::UpdateOntapVolumeConfiguration) -> Self {
88        self.ontap_configuration = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The configuration of the ONTAP volume that you are updating.</p>
92    pub fn set_ontap_configuration(mut self, input: ::std::option::Option<crate::types::UpdateOntapVolumeConfiguration>) -> Self {
93        self.ontap_configuration = input;
94        self
95    }
96    /// <p>The configuration of the ONTAP volume that you are updating.</p>
97    pub fn get_ontap_configuration(&self) -> &::std::option::Option<crate::types::UpdateOntapVolumeConfiguration> {
98        &self.ontap_configuration
99    }
100    /// <p>The name of the OpenZFS volume. OpenZFS root volumes are automatically named <code>FSX</code>. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.</p>
101    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.name = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The name of the OpenZFS volume. OpenZFS root volumes are automatically named <code>FSX</code>. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.</p>
106    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.name = input;
108        self
109    }
110    /// <p>The name of the OpenZFS volume. OpenZFS root volumes are automatically named <code>FSX</code>. Child volume names must be unique among their parent volume's children. The name of the volume is part of the mount string for the OpenZFS volume.</p>
111    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
112        &self.name
113    }
114    /// <p>The configuration of the OpenZFS volume that you are updating.</p>
115    pub fn open_zfs_configuration(mut self, input: crate::types::UpdateOpenZfsVolumeConfiguration) -> Self {
116        self.open_zfs_configuration = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The configuration of the OpenZFS volume that you are updating.</p>
120    pub fn set_open_zfs_configuration(mut self, input: ::std::option::Option<crate::types::UpdateOpenZfsVolumeConfiguration>) -> Self {
121        self.open_zfs_configuration = input;
122        self
123    }
124    /// <p>The configuration of the OpenZFS volume that you are updating.</p>
125    pub fn get_open_zfs_configuration(&self) -> &::std::option::Option<crate::types::UpdateOpenZfsVolumeConfiguration> {
126        &self.open_zfs_configuration
127    }
128    /// Consumes the builder and constructs a [`UpdateVolumeInput`](crate::operation::update_volume::UpdateVolumeInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::update_volume::UpdateVolumeInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::update_volume::UpdateVolumeInput {
133            client_request_token: self.client_request_token,
134            volume_id: self.volume_id,
135            ontap_configuration: self.ontap_configuration,
136            name: self.name,
137            open_zfs_configuration: self.open_zfs_configuration,
138        })
139    }
140}