aws_sdk_computeoptimizerautomation/operation/disassociate_accounts/
_disassociate_accounts_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DisassociateAccountsInput {
6 pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 pub client_token: ::std::option::Option<::std::string::String>,
10}
11impl DisassociateAccountsInput {
12 pub fn account_ids(&self) -> &[::std::string::String] {
16 self.account_ids.as_deref().unwrap_or_default()
17 }
18 pub fn client_token(&self) -> ::std::option::Option<&str> {
20 self.client_token.as_deref()
21 }
22}
23impl DisassociateAccountsInput {
24 pub fn builder() -> crate::operation::disassociate_accounts::builders::DisassociateAccountsInputBuilder {
26 crate::operation::disassociate_accounts::builders::DisassociateAccountsInputBuilder::default()
27 }
28}
29
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DisassociateAccountsInputBuilder {
34 pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
35 pub(crate) client_token: ::std::option::Option<::std::string::String>,
36}
37impl DisassociateAccountsInputBuilder {
38 pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
44 let mut v = self.account_ids.unwrap_or_default();
45 v.push(input.into());
46 self.account_ids = ::std::option::Option::Some(v);
47 self
48 }
49 pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
51 self.account_ids = input;
52 self
53 }
54 pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
56 &self.account_ids
57 }
58 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.client_token = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.client_token = input;
66 self
67 }
68 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
70 &self.client_token
71 }
72 pub fn build(
74 self,
75 ) -> ::std::result::Result<crate::operation::disassociate_accounts::DisassociateAccountsInput, ::aws_smithy_types::error::operation::BuildError>
76 {
77 ::std::result::Result::Ok(crate::operation::disassociate_accounts::DisassociateAccountsInput {
78 account_ids: self.account_ids,
79 client_token: self.client_token,
80 })
81 }
82}