aws-sdk-connect 1.153.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateUserProficienciesInput {
    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the user account.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
    /// <p>The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API.</p>
    pub user_proficiencies: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>>,
}
impl UpdateUserProficienciesInput {
    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The identifier of the user account.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_proficiencies.is_none()`.
    pub fn user_proficiencies(&self) -> &[crate::types::UserProficiency] {
        self.user_proficiencies.as_deref().unwrap_or_default()
    }
}
impl UpdateUserProficienciesInput {
    /// Creates a new builder-style object to manufacture [`UpdateUserProficienciesInput`](crate::operation::update_user_proficiencies::UpdateUserProficienciesInput).
    pub fn builder() -> crate::operation::update_user_proficiencies::builders::UpdateUserProficienciesInputBuilder {
        crate::operation::update_user_proficiencies::builders::UpdateUserProficienciesInputBuilder::default()
    }
}

/// A builder for [`UpdateUserProficienciesInput`](crate::operation::update_user_proficiencies::UpdateUserProficienciesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateUserProficienciesInputBuilder {
    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 UpdateUserProficienciesInputBuilder {
    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    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
    }
    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The identifier of the user account.</p>
    /// This field is required.
    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
    }
    /// <p>The identifier of the user account.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The identifier of the user account.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// Appends an item to `user_proficiencies`.
    ///
    /// To override the contents of this collection use [`set_user_proficiencies`](Self::set_user_proficiencies).
    ///
    /// <p>The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API.</p>
    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
    }
    /// <p>The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API.</p>
    pub fn set_user_proficiencies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>>) -> Self {
        self.user_proficiencies = input;
        self
    }
    /// <p>The proficiencies to be updated for the user. Proficiencies must first be associated to the user. You can do this using AssociateUserProficiencies API.</p>
    pub fn get_user_proficiencies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserProficiency>> {
        &self.user_proficiencies
    }
    /// Consumes the builder and constructs a [`UpdateUserProficienciesInput`](crate::operation::update_user_proficiencies::UpdateUserProficienciesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_user_proficiencies::UpdateUserProficienciesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_user_proficiencies::UpdateUserProficienciesInput {
            instance_id: self.instance_id,
            user_id: self.user_id,
            user_proficiencies: self.user_proficiencies,
        })
    }
}