Skip to main content

aws_sdk_connect/operation/disassociate_user_proficiencies/
_disassociate_user_proficiencies_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DisassociateUserProficienciesInput {
6    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the user account.</p>
9    pub user_id: ::std::option::Option<::std::string::String>,
10    /// <p>The proficiencies to disassociate from the user.</p>
11    pub user_proficiencies: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiencyDisassociate>>,
12}
13impl DisassociateUserProficienciesInput {
14    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
15    pub fn instance_id(&self) -> ::std::option::Option<&str> {
16        self.instance_id.as_deref()
17    }
18    /// <p>The identifier of the user account.</p>
19    pub fn user_id(&self) -> ::std::option::Option<&str> {
20        self.user_id.as_deref()
21    }
22    /// <p>The proficiencies to disassociate from the user.</p>
23    ///
24    /// 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()`.
25    pub fn user_proficiencies(&self) -> &[crate::types::UserProficiencyDisassociate] {
26        self.user_proficiencies.as_deref().unwrap_or_default()
27    }
28}
29impl DisassociateUserProficienciesInput {
30    /// Creates a new builder-style object to manufacture [`DisassociateUserProficienciesInput`](crate::operation::disassociate_user_proficiencies::DisassociateUserProficienciesInput).
31    pub fn builder() -> crate::operation::disassociate_user_proficiencies::builders::DisassociateUserProficienciesInputBuilder {
32        crate::operation::disassociate_user_proficiencies::builders::DisassociateUserProficienciesInputBuilder::default()
33    }
34}
35
36/// A builder for [`DisassociateUserProficienciesInput`](crate::operation::disassociate_user_proficiencies::DisassociateUserProficienciesInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DisassociateUserProficienciesInputBuilder {
40    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
41    pub(crate) user_id: ::std::option::Option<::std::string::String>,
42    pub(crate) user_proficiencies: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiencyDisassociate>>,
43}
44impl DisassociateUserProficienciesInputBuilder {
45    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
46    /// This field is required.
47    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.instance_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
52    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.instance_id = input;
54        self
55    }
56    /// <p>The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.</p>
57    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.instance_id
59    }
60    /// <p>The identifier of the user account.</p>
61    /// This field is required.
62    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.user_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The identifier of the user account.</p>
67    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.user_id = input;
69        self
70    }
71    /// <p>The identifier of the user account.</p>
72    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.user_id
74    }
75    /// Appends an item to `user_proficiencies`.
76    ///
77    /// To override the contents of this collection use [`set_user_proficiencies`](Self::set_user_proficiencies).
78    ///
79    /// <p>The proficiencies to disassociate from the user.</p>
80    pub fn user_proficiencies(mut self, input: crate::types::UserProficiencyDisassociate) -> Self {
81        let mut v = self.user_proficiencies.unwrap_or_default();
82        v.push(input);
83        self.user_proficiencies = ::std::option::Option::Some(v);
84        self
85    }
86    /// <p>The proficiencies to disassociate from the user.</p>
87    pub fn set_user_proficiencies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserProficiencyDisassociate>>) -> Self {
88        self.user_proficiencies = input;
89        self
90    }
91    /// <p>The proficiencies to disassociate from the user.</p>
92    pub fn get_user_proficiencies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserProficiencyDisassociate>> {
93        &self.user_proficiencies
94    }
95    /// Consumes the builder and constructs a [`DisassociateUserProficienciesInput`](crate::operation::disassociate_user_proficiencies::DisassociateUserProficienciesInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<
99        crate::operation::disassociate_user_proficiencies::DisassociateUserProficienciesInput,
100        ::aws_smithy_types::error::operation::BuildError,
101    > {
102        ::std::result::Result::Ok(crate::operation::disassociate_user_proficiencies::DisassociateUserProficienciesInput {
103            instance_id: self.instance_id,
104            user_id: self.user_id,
105            user_proficiencies: self.user_proficiencies,
106        })
107    }
108}