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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// 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 AssociateTeamMemberInput {
/// <p>The ID of the project to which you will add the IAM user.</p>
pub project_id: ::std::option::Option<::std::string::String>,
/// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
pub client_request_token: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
pub user_arn: ::std::option::Option<::std::string::String>,
/// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
pub project_role: ::std::option::Option<::std::string::String>,
/// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
pub remote_access_allowed: ::std::option::Option<bool>,
}
impl AssociateTeamMemberInput {
/// <p>The ID of the project to which you will add the IAM user.</p>
pub fn project_id(&self) -> ::std::option::Option<&str> {
self.project_id.as_deref()
}
/// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
pub fn user_arn(&self) -> ::std::option::Option<&str> {
self.user_arn.as_deref()
}
/// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
pub fn project_role(&self) -> ::std::option::Option<&str> {
self.project_role.as_deref()
}
/// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
pub fn remote_access_allowed(&self) -> ::std::option::Option<bool> {
self.remote_access_allowed
}
}
impl AssociateTeamMemberInput {
/// Creates a new builder-style object to manufacture [`AssociateTeamMemberInput`](crate::operation::associate_team_member::AssociateTeamMemberInput).
pub fn builder() -> crate::operation::associate_team_member::builders::AssociateTeamMemberInputBuilder {
crate::operation::associate_team_member::builders::AssociateTeamMemberInputBuilder::default()
}
}
/// A builder for [`AssociateTeamMemberInput`](crate::operation::associate_team_member::AssociateTeamMemberInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateTeamMemberInputBuilder {
pub(crate) project_id: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
pub(crate) user_arn: ::std::option::Option<::std::string::String>,
pub(crate) project_role: ::std::option::Option<::std::string::String>,
pub(crate) remote_access_allowed: ::std::option::Option<bool>,
}
impl AssociateTeamMemberInputBuilder {
/// <p>The ID of the project to which you will add the IAM user.</p>
/// This field is required.
pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the project to which you will add the IAM user.</p>
pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_id = input;
self
}
/// <p>The ID of the project to which you will add the IAM user.</p>
pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.project_id
}
/// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
/// This field is required.
pub fn user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.</p>
pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.user_arn
}
/// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
/// This field is required.
pub fn project_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_role = ::std::option::Option::Some(input.into());
self
}
/// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
pub fn set_project_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_role = input;
self
}
/// <p>The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.</p>
pub fn get_project_role(&self) -> &::std::option::Option<::std::string::String> {
&self.project_role
}
/// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
pub fn remote_access_allowed(mut self, input: bool) -> Self {
self.remote_access_allowed = ::std::option::Option::Some(input);
self
}
/// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
pub fn set_remote_access_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
self.remote_access_allowed = input;
self
}
/// <p>Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.</p>
pub fn get_remote_access_allowed(&self) -> &::std::option::Option<bool> {
&self.remote_access_allowed
}
/// Consumes the builder and constructs a [`AssociateTeamMemberInput`](crate::operation::associate_team_member::AssociateTeamMemberInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_team_member::AssociateTeamMemberInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::associate_team_member::AssociateTeamMemberInput {
project_id: self.project_id,
client_request_token: self.client_request_token,
user_arn: self.user_arn,
project_role: self.project_role,
remote_access_allowed: self.remote_access_allowed,
})
}
}