aws_sdk_licensemanagerusersubscriptions/operation/disassociate_user/
_disassociate_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 DisassociateUserInput {
6    /// <p>The user name from the Active Directory identity provider for the user.</p>
7    pub username: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
9    pub instance_id: ::std::option::Option<::std::string::String>,
10    /// <p>An object that specifies details for the Active Directory identity provider.</p>
11    pub identity_provider: ::std::option::Option<crate::types::IdentityProvider>,
12    /// <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
13    pub instance_user_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
15    pub domain: ::std::option::Option<::std::string::String>,
16}
17impl DisassociateUserInput {
18    /// <p>The user name from the Active Directory identity provider for the user.</p>
19    pub fn username(&self) -> ::std::option::Option<&str> {
20        self.username.as_deref()
21    }
22    /// <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
23    pub fn instance_id(&self) -> ::std::option::Option<&str> {
24        self.instance_id.as_deref()
25    }
26    /// <p>An object that specifies details for the Active Directory identity provider.</p>
27    pub fn identity_provider(&self) -> ::std::option::Option<&crate::types::IdentityProvider> {
28        self.identity_provider.as_ref()
29    }
30    /// <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
31    pub fn instance_user_arn(&self) -> ::std::option::Option<&str> {
32        self.instance_user_arn.as_deref()
33    }
34    /// <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
35    pub fn domain(&self) -> ::std::option::Option<&str> {
36        self.domain.as_deref()
37    }
38}
39impl DisassociateUserInput {
40    /// Creates a new builder-style object to manufacture [`DisassociateUserInput`](crate::operation::disassociate_user::DisassociateUserInput).
41    pub fn builder() -> crate::operation::disassociate_user::builders::DisassociateUserInputBuilder {
42        crate::operation::disassociate_user::builders::DisassociateUserInputBuilder::default()
43    }
44}
45
46/// A builder for [`DisassociateUserInput`](crate::operation::disassociate_user::DisassociateUserInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DisassociateUserInputBuilder {
50    pub(crate) username: ::std::option::Option<::std::string::String>,
51    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
52    pub(crate) identity_provider: ::std::option::Option<crate::types::IdentityProvider>,
53    pub(crate) instance_user_arn: ::std::option::Option<::std::string::String>,
54    pub(crate) domain: ::std::option::Option<::std::string::String>,
55}
56impl DisassociateUserInputBuilder {
57    /// <p>The user name from the Active Directory identity provider for the user.</p>
58    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.username = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The user name from the Active Directory identity provider for the user.</p>
63    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.username = input;
65        self
66    }
67    /// <p>The user name from the Active Directory identity provider for the user.</p>
68    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
69        &self.username
70    }
71    /// <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
72    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.instance_id = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
77    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.instance_id = input;
79        self
80    }
81    /// <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
82    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
83        &self.instance_id
84    }
85    /// <p>An object that specifies details for the Active Directory identity provider.</p>
86    pub fn identity_provider(mut self, input: crate::types::IdentityProvider) -> Self {
87        self.identity_provider = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>An object that specifies details for the Active Directory identity provider.</p>
91    pub fn set_identity_provider(mut self, input: ::std::option::Option<crate::types::IdentityProvider>) -> Self {
92        self.identity_provider = input;
93        self
94    }
95    /// <p>An object that specifies details for the Active Directory identity provider.</p>
96    pub fn get_identity_provider(&self) -> &::std::option::Option<crate::types::IdentityProvider> {
97        &self.identity_provider
98    }
99    /// <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
100    pub fn instance_user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.instance_user_arn = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
105    pub fn set_instance_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.instance_user_arn = input;
107        self
108    }
109    /// <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
110    pub fn get_instance_user_arn(&self) -> &::std::option::Option<::std::string::String> {
111        &self.instance_user_arn
112    }
113    /// <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
114    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.domain = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
119    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.domain = input;
121        self
122    }
123    /// <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
124    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
125        &self.domain
126    }
127    /// Consumes the builder and constructs a [`DisassociateUserInput`](crate::operation::disassociate_user::DisassociateUserInput).
128    pub fn build(
129        self,
130    ) -> ::std::result::Result<crate::operation::disassociate_user::DisassociateUserInput, ::aws_smithy_types::error::operation::BuildError> {
131        ::std::result::Result::Ok(crate::operation::disassociate_user::DisassociateUserInput {
132            username: self.username,
133            instance_id: self.instance_id,
134            identity_provider: self.identity_provider,
135            instance_user_arn: self.instance_user_arn,
136            domain: self.domain,
137        })
138    }
139}