aws_sdk_ec2/operation/release_address/
_release_address_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 ReleaseAddressInput {
6    /// <p>The allocation ID. This parameter is required.</p>
7    pub allocation_id: ::std::option::Option<::std::string::String>,
8    /// <p>Deprecated.</p>
9    pub public_ip: ::std::option::Option<::std::string::String>,
10    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
11    /// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
12    pub network_border_group: ::std::option::Option<::std::string::String>,
13    /// <p>Checks 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>
14    pub dry_run: ::std::option::Option<bool>,
15}
16impl ReleaseAddressInput {
17    /// <p>The allocation ID. This parameter is required.</p>
18    pub fn allocation_id(&self) -> ::std::option::Option<&str> {
19        self.allocation_id.as_deref()
20    }
21    /// <p>Deprecated.</p>
22    pub fn public_ip(&self) -> ::std::option::Option<&str> {
23        self.public_ip.as_deref()
24    }
25    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
26    /// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
27    pub fn network_border_group(&self) -> ::std::option::Option<&str> {
28        self.network_border_group.as_deref()
29    }
30    /// <p>Checks 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>
31    pub fn dry_run(&self) -> ::std::option::Option<bool> {
32        self.dry_run
33    }
34}
35impl ReleaseAddressInput {
36    /// Creates a new builder-style object to manufacture [`ReleaseAddressInput`](crate::operation::release_address::ReleaseAddressInput).
37    pub fn builder() -> crate::operation::release_address::builders::ReleaseAddressInputBuilder {
38        crate::operation::release_address::builders::ReleaseAddressInputBuilder::default()
39    }
40}
41
42/// A builder for [`ReleaseAddressInput`](crate::operation::release_address::ReleaseAddressInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct ReleaseAddressInputBuilder {
46    pub(crate) allocation_id: ::std::option::Option<::std::string::String>,
47    pub(crate) public_ip: ::std::option::Option<::std::string::String>,
48    pub(crate) network_border_group: ::std::option::Option<::std::string::String>,
49    pub(crate) dry_run: ::std::option::Option<bool>,
50}
51impl ReleaseAddressInputBuilder {
52    /// <p>The allocation ID. This parameter is required.</p>
53    pub fn allocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.allocation_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The allocation ID. This parameter is required.</p>
58    pub fn set_allocation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.allocation_id = input;
60        self
61    }
62    /// <p>The allocation ID. This parameter is required.</p>
63    pub fn get_allocation_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.allocation_id
65    }
66    /// <p>Deprecated.</p>
67    pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.public_ip = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>Deprecated.</p>
72    pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.public_ip = input;
74        self
75    }
76    /// <p>Deprecated.</p>
77    pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
78        &self.public_ip
79    }
80    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
81    /// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
82    pub fn network_border_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.network_border_group = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
87    /// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
88    pub fn set_network_border_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.network_border_group = input;
90        self
91    }
92    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
93    /// <p>If you provide an incorrect network border group, you receive an <code>InvalidAddress.NotFound</code> error.</p>
94    pub fn get_network_border_group(&self) -> &::std::option::Option<::std::string::String> {
95        &self.network_border_group
96    }
97    /// <p>Checks 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>
98    pub fn dry_run(mut self, input: bool) -> Self {
99        self.dry_run = ::std::option::Option::Some(input);
100        self
101    }
102    /// <p>Checks 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>
103    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
104        self.dry_run = input;
105        self
106    }
107    /// <p>Checks 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>
108    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
109        &self.dry_run
110    }
111    /// Consumes the builder and constructs a [`ReleaseAddressInput`](crate::operation::release_address::ReleaseAddressInput).
112    pub fn build(
113        self,
114    ) -> ::std::result::Result<crate::operation::release_address::ReleaseAddressInput, ::aws_smithy_types::error::operation::BuildError> {
115        ::std::result::Result::Ok(crate::operation::release_address::ReleaseAddressInput {
116            allocation_id: self.allocation_id,
117            public_ip: self.public_ip,
118            network_border_group: self.network_border_group,
119            dry_run: self.dry_run,
120        })
121    }
122}