#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateUserProficienciesInput {
pub instance_id: ::std::option::Option<::std::string::String>,
pub user_id: ::std::option::Option<::std::string::String>,
pub user_proficiencies: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>>,
}
impl AssociateUserProficienciesInput {
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
pub fn user_id(&self) -> ::std::option::Option<&str> {
self.user_id.as_deref()
}
pub fn user_proficiencies(&self) -> &[crate::types::UserProficiency] {
self.user_proficiencies.as_deref().unwrap_or_default()
}
}
impl AssociateUserProficienciesInput {
pub fn builder() -> crate::operation::associate_user_proficiencies::builders::AssociateUserProficienciesInputBuilder {
crate::operation::associate_user_proficiencies::builders::AssociateUserProficienciesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateUserProficienciesInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) user_id: ::std::option::Option<::std::string::String>,
pub(crate) user_proficiencies: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>>,
}
impl AssociateUserProficienciesInputBuilder {
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
&self.user_id
}
pub fn user_proficiencies(mut self, input: crate::types::UserProficiency) -> Self {
let mut v = self.user_proficiencies.unwrap_or_default();
v.push(input);
self.user_proficiencies = ::std::option::Option::Some(v);
self
}
pub fn set_user_proficiencies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>>) -> Self {
self.user_proficiencies = input;
self
}
pub fn get_user_proficiencies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>> {
&self.user_proficiencies
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::associate_user_proficiencies::AssociateUserProficienciesInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::associate_user_proficiencies::AssociateUserProficienciesInput {
instance_id: self.instance_id,
user_id: self.user_id,
user_proficiencies: self.user_proficiencies,
})
}
}