aws_sdk_wellarchitected/operation/disassociate_profiles/
_disassociate_profiles_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateProfilesInput {
pub workload_id: ::std::option::Option<::std::string::String>,
pub profile_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateProfilesInput {
pub fn workload_id(&self) -> ::std::option::Option<&str> {
self.workload_id.as_deref()
}
pub fn profile_arns(&self) -> &[::std::string::String] {
self.profile_arns.as_deref().unwrap_or_default()
}
}
impl DisassociateProfilesInput {
pub fn builder() -> crate::operation::disassociate_profiles::builders::DisassociateProfilesInputBuilder {
crate::operation::disassociate_profiles::builders::DisassociateProfilesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateProfilesInputBuilder {
pub(crate) workload_id: ::std::option::Option<::std::string::String>,
pub(crate) profile_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateProfilesInputBuilder {
pub fn workload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workload_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workload_id = input;
self
}
pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workload_id
}
pub fn profile_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.profile_arns.unwrap_or_default();
v.push(input.into());
self.profile_arns = ::std::option::Option::Some(v);
self
}
pub fn set_profile_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.profile_arns = input;
self
}
pub fn get_profile_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.profile_arns
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::disassociate_profiles::DisassociateProfilesInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::disassociate_profiles::DisassociateProfilesInput {
workload_id: self.workload_id,
profile_arns: self.profile_arns,
})
}
}