#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateProfileInput {
pub profile_id: ::std::option::Option<::std::string::String>,
pub resource_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl AssociateProfileInput {
pub fn profile_id(&self) -> ::std::option::Option<&str> {
self.profile_id.as_deref()
}
pub fn resource_id(&self) -> ::std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl AssociateProfileInput {
pub fn builder() -> crate::operation::associate_profile::builders::AssociateProfileInputBuilder {
crate::operation::associate_profile::builders::AssociateProfileInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateProfileInputBuilder {
pub(crate) profile_id: ::std::option::Option<::std::string::String>,
pub(crate) resource_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl AssociateProfileInputBuilder {
pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_id = input;
self
}
pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_id
}
pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_profile::AssociateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::associate_profile::AssociateProfileInput {
profile_id: self.profile_id,
resource_id: self.resource_id,
name: self.name,
tags: self.tags,
})
}
}