aws_sdk_connect/operation/create_instance/
_create_instance_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)]
5pub struct CreateInstanceInput {
6    /// <p>The idempotency token.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The type of identity management for your Amazon Connect users.</p>
9    pub identity_management_type: ::std::option::Option<crate::types::DirectoryType>,
10    /// <p>The name for your instance.</p>
11    pub instance_alias: ::std::option::Option<::std::string::String>,
12    /// <p>The identifier for the directory.</p>
13    pub directory_id: ::std::option::Option<::std::string::String>,
14    /// <p>Your contact center handles incoming contacts.</p>
15    pub inbound_calls_enabled: ::std::option::Option<bool>,
16    /// <p>Your contact center allows outbound calls.</p>
17    pub outbound_calls_enabled: ::std::option::Option<bool>,
18    /// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
19    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateInstanceInput {
22    /// <p>The idempotency token.</p>
23    pub fn client_token(&self) -> ::std::option::Option<&str> {
24        self.client_token.as_deref()
25    }
26    /// <p>The type of identity management for your Amazon Connect users.</p>
27    pub fn identity_management_type(&self) -> ::std::option::Option<&crate::types::DirectoryType> {
28        self.identity_management_type.as_ref()
29    }
30    /// <p>The name for your instance.</p>
31    pub fn instance_alias(&self) -> ::std::option::Option<&str> {
32        self.instance_alias.as_deref()
33    }
34    /// <p>The identifier for the directory.</p>
35    pub fn directory_id(&self) -> ::std::option::Option<&str> {
36        self.directory_id.as_deref()
37    }
38    /// <p>Your contact center handles incoming contacts.</p>
39    pub fn inbound_calls_enabled(&self) -> ::std::option::Option<bool> {
40        self.inbound_calls_enabled
41    }
42    /// <p>Your contact center allows outbound calls.</p>
43    pub fn outbound_calls_enabled(&self) -> ::std::option::Option<bool> {
44        self.outbound_calls_enabled
45    }
46    /// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
47    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48        self.tags.as_ref()
49    }
50}
51impl ::std::fmt::Debug for CreateInstanceInput {
52    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53        let mut formatter = f.debug_struct("CreateInstanceInput");
54        formatter.field("client_token", &self.client_token);
55        formatter.field("identity_management_type", &self.identity_management_type);
56        formatter.field("instance_alias", &"*** Sensitive Data Redacted ***");
57        formatter.field("directory_id", &self.directory_id);
58        formatter.field("inbound_calls_enabled", &self.inbound_calls_enabled);
59        formatter.field("outbound_calls_enabled", &self.outbound_calls_enabled);
60        formatter.field("tags", &self.tags);
61        formatter.finish()
62    }
63}
64impl CreateInstanceInput {
65    /// Creates a new builder-style object to manufacture [`CreateInstanceInput`](crate::operation::create_instance::CreateInstanceInput).
66    pub fn builder() -> crate::operation::create_instance::builders::CreateInstanceInputBuilder {
67        crate::operation::create_instance::builders::CreateInstanceInputBuilder::default()
68    }
69}
70
71/// A builder for [`CreateInstanceInput`](crate::operation::create_instance::CreateInstanceInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateInstanceInputBuilder {
75    pub(crate) client_token: ::std::option::Option<::std::string::String>,
76    pub(crate) identity_management_type: ::std::option::Option<crate::types::DirectoryType>,
77    pub(crate) instance_alias: ::std::option::Option<::std::string::String>,
78    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
79    pub(crate) inbound_calls_enabled: ::std::option::Option<bool>,
80    pub(crate) outbound_calls_enabled: ::std::option::Option<bool>,
81    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
82}
83impl CreateInstanceInputBuilder {
84    /// <p>The idempotency token.</p>
85    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.client_token = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The idempotency token.</p>
90    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.client_token = input;
92        self
93    }
94    /// <p>The idempotency token.</p>
95    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
96        &self.client_token
97    }
98    /// <p>The type of identity management for your Amazon Connect users.</p>
99    /// This field is required.
100    pub fn identity_management_type(mut self, input: crate::types::DirectoryType) -> Self {
101        self.identity_management_type = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The type of identity management for your Amazon Connect users.</p>
105    pub fn set_identity_management_type(mut self, input: ::std::option::Option<crate::types::DirectoryType>) -> Self {
106        self.identity_management_type = input;
107        self
108    }
109    /// <p>The type of identity management for your Amazon Connect users.</p>
110    pub fn get_identity_management_type(&self) -> &::std::option::Option<crate::types::DirectoryType> {
111        &self.identity_management_type
112    }
113    /// <p>The name for your instance.</p>
114    pub fn instance_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.instance_alias = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The name for your instance.</p>
119    pub fn set_instance_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.instance_alias = input;
121        self
122    }
123    /// <p>The name for your instance.</p>
124    pub fn get_instance_alias(&self) -> &::std::option::Option<::std::string::String> {
125        &self.instance_alias
126    }
127    /// <p>The identifier for the directory.</p>
128    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.directory_id = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The identifier for the directory.</p>
133    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.directory_id = input;
135        self
136    }
137    /// <p>The identifier for the directory.</p>
138    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
139        &self.directory_id
140    }
141    /// <p>Your contact center handles incoming contacts.</p>
142    /// This field is required.
143    pub fn inbound_calls_enabled(mut self, input: bool) -> Self {
144        self.inbound_calls_enabled = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>Your contact center handles incoming contacts.</p>
148    pub fn set_inbound_calls_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
149        self.inbound_calls_enabled = input;
150        self
151    }
152    /// <p>Your contact center handles incoming contacts.</p>
153    pub fn get_inbound_calls_enabled(&self) -> &::std::option::Option<bool> {
154        &self.inbound_calls_enabled
155    }
156    /// <p>Your contact center allows outbound calls.</p>
157    /// This field is required.
158    pub fn outbound_calls_enabled(mut self, input: bool) -> Self {
159        self.outbound_calls_enabled = ::std::option::Option::Some(input);
160        self
161    }
162    /// <p>Your contact center allows outbound calls.</p>
163    pub fn set_outbound_calls_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
164        self.outbound_calls_enabled = input;
165        self
166    }
167    /// <p>Your contact center allows outbound calls.</p>
168    pub fn get_outbound_calls_enabled(&self) -> &::std::option::Option<bool> {
169        &self.outbound_calls_enabled
170    }
171    /// Adds a key-value pair to `tags`.
172    ///
173    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
174    ///
175    /// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
176    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
177        let mut hash_map = self.tags.unwrap_or_default();
178        hash_map.insert(k.into(), v.into());
179        self.tags = ::std::option::Option::Some(hash_map);
180        self
181    }
182    /// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
183    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
184        self.tags = input;
185        self
186    }
187    /// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
188    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
189        &self.tags
190    }
191    /// Consumes the builder and constructs a [`CreateInstanceInput`](crate::operation::create_instance::CreateInstanceInput).
192    pub fn build(
193        self,
194    ) -> ::std::result::Result<crate::operation::create_instance::CreateInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
195        ::std::result::Result::Ok(crate::operation::create_instance::CreateInstanceInput {
196            client_token: self.client_token,
197            identity_management_type: self.identity_management_type,
198            instance_alias: self.instance_alias,
199            directory_id: self.directory_id,
200            inbound_calls_enabled: self.inbound_calls_enabled,
201            outbound_calls_enabled: self.outbound_calls_enabled,
202            tags: self.tags,
203        })
204    }
205}
206impl ::std::fmt::Debug for CreateInstanceInputBuilder {
207    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
208        let mut formatter = f.debug_struct("CreateInstanceInputBuilder");
209        formatter.field("client_token", &self.client_token);
210        formatter.field("identity_management_type", &self.identity_management_type);
211        formatter.field("instance_alias", &"*** Sensitive Data Redacted ***");
212        formatter.field("directory_id", &self.directory_id);
213        formatter.field("inbound_calls_enabled", &self.inbound_calls_enabled);
214        formatter.field("outbound_calls_enabled", &self.outbound_calls_enabled);
215        formatter.field("tags", &self.tags);
216        formatter.finish()
217    }
218}