aws_sdk_ec2/operation/modify_ipam/
_modify_ipam_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 ModifyIpamInput {
6    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
7    pub dry_run: ::std::option::Option<bool>,
8    /// <p>The ID of the IPAM you want to modify.</p>
9    pub ipam_id: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the IPAM you want to modify.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
13    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
14    pub add_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
15    /// <p>The operating Regions to remove.</p>
16    pub remove_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>,
17    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
18    pub tier: ::std::option::Option<crate::types::IpamTier>,
19    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
20    pub enable_private_gua: ::std::option::Option<bool>,
21}
22impl ModifyIpamInput {
23    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
24    pub fn dry_run(&self) -> ::std::option::Option<bool> {
25        self.dry_run
26    }
27    /// <p>The ID of the IPAM you want to modify.</p>
28    pub fn ipam_id(&self) -> ::std::option::Option<&str> {
29        self.ipam_id.as_deref()
30    }
31    /// <p>The description of the IPAM you want to modify.</p>
32    pub fn description(&self) -> ::std::option::Option<&str> {
33        self.description.as_deref()
34    }
35    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
36    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.add_operating_regions.is_none()`.
39    pub fn add_operating_regions(&self) -> &[crate::types::AddIpamOperatingRegion] {
40        self.add_operating_regions.as_deref().unwrap_or_default()
41    }
42    /// <p>The operating Regions to remove.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.remove_operating_regions.is_none()`.
45    pub fn remove_operating_regions(&self) -> &[crate::types::RemoveIpamOperatingRegion] {
46        self.remove_operating_regions.as_deref().unwrap_or_default()
47    }
48    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
49    pub fn tier(&self) -> ::std::option::Option<&crate::types::IpamTier> {
50        self.tier.as_ref()
51    }
52    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
53    pub fn enable_private_gua(&self) -> ::std::option::Option<bool> {
54        self.enable_private_gua
55    }
56}
57impl ModifyIpamInput {
58    /// Creates a new builder-style object to manufacture [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
59    pub fn builder() -> crate::operation::modify_ipam::builders::ModifyIpamInputBuilder {
60        crate::operation::modify_ipam::builders::ModifyIpamInputBuilder::default()
61    }
62}
63
64/// A builder for [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct ModifyIpamInputBuilder {
68    pub(crate) dry_run: ::std::option::Option<bool>,
69    pub(crate) ipam_id: ::std::option::Option<::std::string::String>,
70    pub(crate) description: ::std::option::Option<::std::string::String>,
71    pub(crate) add_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
72    pub(crate) remove_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>,
73    pub(crate) tier: ::std::option::Option<crate::types::IpamTier>,
74    pub(crate) enable_private_gua: ::std::option::Option<bool>,
75}
76impl ModifyIpamInputBuilder {
77    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
78    pub fn dry_run(mut self, input: bool) -> Self {
79        self.dry_run = ::std::option::Option::Some(input);
80        self
81    }
82    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
83    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
84        self.dry_run = input;
85        self
86    }
87    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
88    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
89        &self.dry_run
90    }
91    /// <p>The ID of the IPAM you want to modify.</p>
92    /// This field is required.
93    pub fn ipam_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.ipam_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The ID of the IPAM you want to modify.</p>
98    pub fn set_ipam_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.ipam_id = input;
100        self
101    }
102    /// <p>The ID of the IPAM you want to modify.</p>
103    pub fn get_ipam_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.ipam_id
105    }
106    /// <p>The description of the IPAM you want to modify.</p>
107    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.description = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The description of the IPAM you want to modify.</p>
112    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.description = input;
114        self
115    }
116    /// <p>The description of the IPAM you want to modify.</p>
117    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
118        &self.description
119    }
120    /// Appends an item to `add_operating_regions`.
121    ///
122    /// To override the contents of this collection use [`set_add_operating_regions`](Self::set_add_operating_regions).
123    ///
124    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
125    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
126    pub fn add_operating_regions(mut self, input: crate::types::AddIpamOperatingRegion) -> Self {
127        let mut v = self.add_operating_regions.unwrap_or_default();
128        v.push(input);
129        self.add_operating_regions = ::std::option::Option::Some(v);
130        self
131    }
132    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
133    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
134    pub fn set_add_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>) -> Self {
135        self.add_operating_regions = input;
136        self
137    }
138    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
139    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
140    pub fn get_add_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>> {
141        &self.add_operating_regions
142    }
143    /// Appends an item to `remove_operating_regions`.
144    ///
145    /// To override the contents of this collection use [`set_remove_operating_regions`](Self::set_remove_operating_regions).
146    ///
147    /// <p>The operating Regions to remove.</p>
148    pub fn remove_operating_regions(mut self, input: crate::types::RemoveIpamOperatingRegion) -> Self {
149        let mut v = self.remove_operating_regions.unwrap_or_default();
150        v.push(input);
151        self.remove_operating_regions = ::std::option::Option::Some(v);
152        self
153    }
154    /// <p>The operating Regions to remove.</p>
155    pub fn set_remove_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>) -> Self {
156        self.remove_operating_regions = input;
157        self
158    }
159    /// <p>The operating Regions to remove.</p>
160    pub fn get_remove_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>> {
161        &self.remove_operating_regions
162    }
163    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
164    pub fn tier(mut self, input: crate::types::IpamTier) -> Self {
165        self.tier = ::std::option::Option::Some(input);
166        self
167    }
168    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
169    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::IpamTier>) -> Self {
170        self.tier = input;
171        self
172    }
173    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
174    pub fn get_tier(&self) -> &::std::option::Option<crate::types::IpamTier> {
175        &self.tier
176    }
177    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
178    pub fn enable_private_gua(mut self, input: bool) -> Self {
179        self.enable_private_gua = ::std::option::Option::Some(input);
180        self
181    }
182    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
183    pub fn set_enable_private_gua(mut self, input: ::std::option::Option<bool>) -> Self {
184        self.enable_private_gua = input;
185        self
186    }
187    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
188    pub fn get_enable_private_gua(&self) -> &::std::option::Option<bool> {
189        &self.enable_private_gua
190    }
191    /// Consumes the builder and constructs a [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
192    pub fn build(self) -> ::std::result::Result<crate::operation::modify_ipam::ModifyIpamInput, ::aws_smithy_types::error::operation::BuildError> {
193        ::std::result::Result::Ok(crate::operation::modify_ipam::ModifyIpamInput {
194            dry_run: self.dry_run,
195            ipam_id: self.ipam_id,
196            description: self.description,
197            add_operating_regions: self.add_operating_regions,
198            remove_operating_regions: self.remove_operating_regions,
199            tier: self.tier,
200            enable_private_gua: self.enable_private_gua,
201        })
202    }
203}