1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// 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 CreateAuthCodeInput {
/// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
pub instance_id: ::std::option::Option<::std::string::String>,
/// <p>The scope for the authorization code. Defines the permissions and access boundaries for the session.</p>
pub scope: ::std::option::Option<crate::types::AuthScope>,
/// <p>The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.</p>
pub max_session_duration_minutes: ::std::option::Option<i32>,
/// <p>The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).</p>
pub session_inactivity_duration_minutes: ::std::option::Option<i32>,
}
impl CreateAuthCodeInput {
/// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> 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 scope for the authorization code. Defines the permissions and access boundaries for the session.</p>
pub fn scope(&self) -> ::std::option::Option<&crate::types::AuthScope> {
self.scope.as_ref()
}
/// <p>The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.</p>
pub fn max_session_duration_minutes(&self) -> ::std::option::Option<i32> {
self.max_session_duration_minutes
}
/// <p>The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).</p>
pub fn session_inactivity_duration_minutes(&self) -> ::std::option::Option<i32> {
self.session_inactivity_duration_minutes
}
}
impl CreateAuthCodeInput {
/// Creates a new builder-style object to manufacture [`CreateAuthCodeInput`](crate::operation::create_auth_code::CreateAuthCodeInput).
pub fn builder() -> crate::operation::create_auth_code::builders::CreateAuthCodeInputBuilder {
crate::operation::create_auth_code::builders::CreateAuthCodeInputBuilder::default()
}
}
/// A builder for [`CreateAuthCodeInput`](crate::operation::create_auth_code::CreateAuthCodeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAuthCodeInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) scope: ::std::option::Option<crate::types::AuthScope>,
pub(crate) max_session_duration_minutes: ::std::option::Option<i32>,
pub(crate) session_inactivity_duration_minutes: ::std::option::Option<i32>,
}
impl CreateAuthCodeInputBuilder {
/// <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> 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 Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> 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 Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> 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 scope for the authorization code. Defines the permissions and access boundaries for the session.</p>
/// This field is required.
pub fn scope(mut self, input: crate::types::AuthScope) -> Self {
self.scope = ::std::option::Option::Some(input);
self
}
/// <p>The scope for the authorization code. Defines the permissions and access boundaries for the session.</p>
pub fn set_scope(mut self, input: ::std::option::Option<crate::types::AuthScope>) -> Self {
self.scope = input;
self
}
/// <p>The scope for the authorization code. Defines the permissions and access boundaries for the session.</p>
pub fn get_scope(&self) -> &::std::option::Option<crate::types::AuthScope> {
&self.scope
}
/// <p>The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.</p>
pub fn max_session_duration_minutes(mut self, input: i32) -> Self {
self.max_session_duration_minutes = ::std::option::Option::Some(input);
self
}
/// <p>The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.</p>
pub fn set_max_session_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_session_duration_minutes = input;
self
}
/// <p>The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.</p>
pub fn get_max_session_duration_minutes(&self) -> &::std::option::Option<i32> {
&self.max_session_duration_minutes
}
/// <p>The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).</p>
/// This field is required.
pub fn session_inactivity_duration_minutes(mut self, input: i32) -> Self {
self.session_inactivity_duration_minutes = ::std::option::Option::Some(input);
self
}
/// <p>The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).</p>
pub fn set_session_inactivity_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
self.session_inactivity_duration_minutes = input;
self
}
/// <p>The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).</p>
pub fn get_session_inactivity_duration_minutes(&self) -> &::std::option::Option<i32> {
&self.session_inactivity_duration_minutes
}
/// Consumes the builder and constructs a [`CreateAuthCodeInput`](crate::operation::create_auth_code::CreateAuthCodeInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_auth_code::CreateAuthCodeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_auth_code::CreateAuthCodeInput {
instance_id: self.instance_id,
scope: self.scope,
max_session_duration_minutes: self.max_session_duration_minutes,
session_inactivity_duration_minutes: self.session_inactivity_duration_minutes,
})
}
}