aws_sdk_chime/operation/update_user/
_update_user_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 UpdateUserInput {
6    /// <p>The Amazon Chime account ID.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The user ID.</p>
9    pub user_id: ::std::option::Option<::std::string::String>,
10    /// <p>The user license type to update. This must be a supported license type for the Amazon Chime account that the user belongs to.</p>
11    pub license_type: ::std::option::Option<crate::types::License>,
12    /// <p>The user type.</p>
13    pub user_type: ::std::option::Option<crate::types::UserType>,
14    /// <p>The Alexa for Business metadata.</p>
15    pub alexa_for_business_metadata: ::std::option::Option<crate::types::AlexaForBusinessMetadata>,
16}
17impl UpdateUserInput {
18    /// <p>The Amazon Chime account ID.</p>
19    pub fn account_id(&self) -> ::std::option::Option<&str> {
20        self.account_id.as_deref()
21    }
22    /// <p>The user ID.</p>
23    pub fn user_id(&self) -> ::std::option::Option<&str> {
24        self.user_id.as_deref()
25    }
26    /// <p>The user license type to update. This must be a supported license type for the Amazon Chime account that the user belongs to.</p>
27    pub fn license_type(&self) -> ::std::option::Option<&crate::types::License> {
28        self.license_type.as_ref()
29    }
30    /// <p>The user type.</p>
31    pub fn user_type(&self) -> ::std::option::Option<&crate::types::UserType> {
32        self.user_type.as_ref()
33    }
34    /// <p>The Alexa for Business metadata.</p>
35    pub fn alexa_for_business_metadata(&self) -> ::std::option::Option<&crate::types::AlexaForBusinessMetadata> {
36        self.alexa_for_business_metadata.as_ref()
37    }
38}
39impl UpdateUserInput {
40    /// Creates a new builder-style object to manufacture [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
41    pub fn builder() -> crate::operation::update_user::builders::UpdateUserInputBuilder {
42        crate::operation::update_user::builders::UpdateUserInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateUserInputBuilder {
50    pub(crate) account_id: ::std::option::Option<::std::string::String>,
51    pub(crate) user_id: ::std::option::Option<::std::string::String>,
52    pub(crate) license_type: ::std::option::Option<crate::types::License>,
53    pub(crate) user_type: ::std::option::Option<crate::types::UserType>,
54    pub(crate) alexa_for_business_metadata: ::std::option::Option<crate::types::AlexaForBusinessMetadata>,
55}
56impl UpdateUserInputBuilder {
57    /// <p>The Amazon Chime account ID.</p>
58    /// This field is required.
59    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.account_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The Amazon Chime account ID.</p>
64    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.account_id = input;
66        self
67    }
68    /// <p>The Amazon Chime account ID.</p>
69    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.account_id
71    }
72    /// <p>The user ID.</p>
73    /// This field is required.
74    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.user_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The user ID.</p>
79    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.user_id = input;
81        self
82    }
83    /// <p>The user ID.</p>
84    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.user_id
86    }
87    /// <p>The user license type to update. This must be a supported license type for the Amazon Chime account that the user belongs to.</p>
88    pub fn license_type(mut self, input: crate::types::License) -> Self {
89        self.license_type = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>The user license type to update. This must be a supported license type for the Amazon Chime account that the user belongs to.</p>
93    pub fn set_license_type(mut self, input: ::std::option::Option<crate::types::License>) -> Self {
94        self.license_type = input;
95        self
96    }
97    /// <p>The user license type to update. This must be a supported license type for the Amazon Chime account that the user belongs to.</p>
98    pub fn get_license_type(&self) -> &::std::option::Option<crate::types::License> {
99        &self.license_type
100    }
101    /// <p>The user type.</p>
102    pub fn user_type(mut self, input: crate::types::UserType) -> Self {
103        self.user_type = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>The user type.</p>
107    pub fn set_user_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
108        self.user_type = input;
109        self
110    }
111    /// <p>The user type.</p>
112    pub fn get_user_type(&self) -> &::std::option::Option<crate::types::UserType> {
113        &self.user_type
114    }
115    /// <p>The Alexa for Business metadata.</p>
116    pub fn alexa_for_business_metadata(mut self, input: crate::types::AlexaForBusinessMetadata) -> Self {
117        self.alexa_for_business_metadata = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>The Alexa for Business metadata.</p>
121    pub fn set_alexa_for_business_metadata(mut self, input: ::std::option::Option<crate::types::AlexaForBusinessMetadata>) -> Self {
122        self.alexa_for_business_metadata = input;
123        self
124    }
125    /// <p>The Alexa for Business metadata.</p>
126    pub fn get_alexa_for_business_metadata(&self) -> &::std::option::Option<crate::types::AlexaForBusinessMetadata> {
127        &self.alexa_for_business_metadata
128    }
129    /// Consumes the builder and constructs a [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
130    pub fn build(self) -> ::std::result::Result<crate::operation::update_user::UpdateUserInput, ::aws_smithy_types::error::operation::BuildError> {
131        ::std::result::Result::Ok(crate::operation::update_user::UpdateUserInput {
132            account_id: self.account_id,
133            user_id: self.user_id,
134            license_type: self.license_type,
135            user_type: self.user_type,
136            alexa_for_business_metadata: self.alexa_for_business_metadata,
137        })
138    }
139}