aws_sdk_ec2/operation/disassociate_address/
_disassociate_address_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DisassociateAddressInput {
6 pub association_id: ::std::option::Option<::std::string::String>,
8 pub public_ip: ::std::option::Option<::std::string::String>,
10 pub dry_run: ::std::option::Option<bool>,
12}
13impl DisassociateAddressInput {
14 pub fn association_id(&self) -> ::std::option::Option<&str> {
16 self.association_id.as_deref()
17 }
18 pub fn public_ip(&self) -> ::std::option::Option<&str> {
20 self.public_ip.as_deref()
21 }
22 pub fn dry_run(&self) -> ::std::option::Option<bool> {
24 self.dry_run
25 }
26}
27impl DisassociateAddressInput {
28 pub fn builder() -> crate::operation::disassociate_address::builders::DisassociateAddressInputBuilder {
30 crate::operation::disassociate_address::builders::DisassociateAddressInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DisassociateAddressInputBuilder {
38 pub(crate) association_id: ::std::option::Option<::std::string::String>,
39 pub(crate) public_ip: ::std::option::Option<::std::string::String>,
40 pub(crate) dry_run: ::std::option::Option<bool>,
41}
42impl DisassociateAddressInputBuilder {
43 pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.association_id = ::std::option::Option::Some(input.into());
46 self
47 }
48 pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.association_id = input;
51 self
52 }
53 pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
55 &self.association_id
56 }
57 pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.public_ip = ::std::option::Option::Some(input.into());
60 self
61 }
62 pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64 self.public_ip = input;
65 self
66 }
67 pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
69 &self.public_ip
70 }
71 pub fn dry_run(mut self, input: bool) -> Self {
73 self.dry_run = ::std::option::Option::Some(input);
74 self
75 }
76 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
78 self.dry_run = input;
79 self
80 }
81 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
83 &self.dry_run
84 }
85 pub fn build(
87 self,
88 ) -> ::std::result::Result<crate::operation::disassociate_address::DisassociateAddressInput, ::aws_smithy_types::error::operation::BuildError>
89 {
90 ::std::result::Result::Ok(crate::operation::disassociate_address::DisassociateAddressInput {
91 association_id: self.association_id,
92 public_ip: self.public_ip,
93 dry_run: self.dry_run,
94 })
95 }
96}