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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
// 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 AddProfilePermissionInput {
    /// <p>The human-readable name of the signing profile.</p>
    pub profile_name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the signing profile.</p>
    pub profile_version: ::std::option::Option<::std::string::String>,
    /// <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p>
    /// <p>You can designate the following actions to an account.</p>
    /// <ul>
    /// <li>
    /// <p><code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <code>StartSigningJob</code>.</p></li>
    /// <li>
    /// <p><code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <code>SignPayload</code></p></li>
    /// <li>
    /// <p><code>signer:GetSigningProfile</code>. For details, see <code>GetSigningProfile</code>.</p></li>
    /// <li>
    /// <p><code>signer:RevokeSignature</code>. For details, see <code>RevokeSignature</code>.</p></li>
    /// </ul>
    pub action: ::std::option::Option<::std::string::String>,
    /// <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
    pub principal: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the current profile revision.</p>
    pub revision_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the cross-account permission statement.</p>
    pub statement_id: ::std::option::Option<::std::string::String>,
}
impl AddProfilePermissionInput {
    /// <p>The human-readable name of the signing profile.</p>
    pub fn profile_name(&self) -> ::std::option::Option<&str> {
        self.profile_name.as_deref()
    }
    /// <p>The version of the signing profile.</p>
    pub fn profile_version(&self) -> ::std::option::Option<&str> {
        self.profile_version.as_deref()
    }
    /// <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p>
    /// <p>You can designate the following actions to an account.</p>
    /// <ul>
    /// <li>
    /// <p><code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <code>StartSigningJob</code>.</p></li>
    /// <li>
    /// <p><code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <code>SignPayload</code></p></li>
    /// <li>
    /// <p><code>signer:GetSigningProfile</code>. For details, see <code>GetSigningProfile</code>.</p></li>
    /// <li>
    /// <p><code>signer:RevokeSignature</code>. For details, see <code>RevokeSignature</code>.</p></li>
    /// </ul>
    pub fn action(&self) -> ::std::option::Option<&str> {
        self.action.as_deref()
    }
    /// <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
    pub fn principal(&self) -> ::std::option::Option<&str> {
        self.principal.as_deref()
    }
    /// <p>A unique identifier for the current profile revision.</p>
    pub fn revision_id(&self) -> ::std::option::Option<&str> {
        self.revision_id.as_deref()
    }
    /// <p>A unique identifier for the cross-account permission statement.</p>
    pub fn statement_id(&self) -> ::std::option::Option<&str> {
        self.statement_id.as_deref()
    }
}
impl AddProfilePermissionInput {
    /// Creates a new builder-style object to manufacture [`AddProfilePermissionInput`](crate::operation::add_profile_permission::AddProfilePermissionInput).
    pub fn builder() -> crate::operation::add_profile_permission::builders::AddProfilePermissionInputBuilder {
        crate::operation::add_profile_permission::builders::AddProfilePermissionInputBuilder::default()
    }
}

/// A builder for [`AddProfilePermissionInput`](crate::operation::add_profile_permission::AddProfilePermissionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AddProfilePermissionInputBuilder {
    pub(crate) profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) profile_version: ::std::option::Option<::std::string::String>,
    pub(crate) action: ::std::option::Option<::std::string::String>,
    pub(crate) principal: ::std::option::Option<::std::string::String>,
    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
    pub(crate) statement_id: ::std::option::Option<::std::string::String>,
}
impl AddProfilePermissionInputBuilder {
    /// <p>The human-readable name of the signing profile.</p>
    /// This field is required.
    pub fn profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The human-readable name of the signing profile.</p>
    pub fn set_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_name = input;
        self
    }
    /// <p>The human-readable name of the signing profile.</p>
    pub fn get_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_name
    }
    /// <p>The version of the signing profile.</p>
    pub fn profile_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the signing profile.</p>
    pub fn set_profile_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_version = input;
        self
    }
    /// <p>The version of the signing profile.</p>
    pub fn get_profile_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_version
    }
    /// <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p>
    /// <p>You can designate the following actions to an account.</p>
    /// <ul>
    /// <li>
    /// <p><code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <code>StartSigningJob</code>.</p></li>
    /// <li>
    /// <p><code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <code>SignPayload</code></p></li>
    /// <li>
    /// <p><code>signer:GetSigningProfile</code>. For details, see <code>GetSigningProfile</code>.</p></li>
    /// <li>
    /// <p><code>signer:RevokeSignature</code>. For details, see <code>RevokeSignature</code>.</p></li>
    /// </ul>
    /// This field is required.
    pub fn action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.action = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p>
    /// <p>You can designate the following actions to an account.</p>
    /// <ul>
    /// <li>
    /// <p><code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <code>StartSigningJob</code>.</p></li>
    /// <li>
    /// <p><code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <code>SignPayload</code></p></li>
    /// <li>
    /// <p><code>signer:GetSigningProfile</code>. For details, see <code>GetSigningProfile</code>.</p></li>
    /// <li>
    /// <p><code>signer:RevokeSignature</code>. For details, see <code>RevokeSignature</code>.</p></li>
    /// </ul>
    pub fn set_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.action = input;
        self
    }
    /// <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p>
    /// <p>You can designate the following actions to an account.</p>
    /// <ul>
    /// <li>
    /// <p><code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <code>StartSigningJob</code>.</p></li>
    /// <li>
    /// <p><code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <code>SignPayload</code></p></li>
    /// <li>
    /// <p><code>signer:GetSigningProfile</code>. For details, see <code>GetSigningProfile</code>.</p></li>
    /// <li>
    /// <p><code>signer:RevokeSignature</code>. For details, see <code>RevokeSignature</code>.</p></li>
    /// </ul>
    pub fn get_action(&self) -> &::std::option::Option<::std::string::String> {
        &self.action
    }
    /// <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
    /// This field is required.
    pub fn principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.principal = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
    pub fn set_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.principal = input;
        self
    }
    /// <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
    pub fn get_principal(&self) -> &::std::option::Option<::std::string::String> {
        &self.principal
    }
    /// <p>A unique identifier for the current profile revision.</p>
    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.revision_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the current profile revision.</p>
    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.revision_id = input;
        self
    }
    /// <p>A unique identifier for the current profile revision.</p>
    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.revision_id
    }
    /// <p>A unique identifier for the cross-account permission statement.</p>
    /// This field is required.
    pub fn statement_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.statement_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the cross-account permission statement.</p>
    pub fn set_statement_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.statement_id = input;
        self
    }
    /// <p>A unique identifier for the cross-account permission statement.</p>
    pub fn get_statement_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.statement_id
    }
    /// Consumes the builder and constructs a [`AddProfilePermissionInput`](crate::operation::add_profile_permission::AddProfilePermissionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::add_profile_permission::AddProfilePermissionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::add_profile_permission::AddProfilePermissionInput {
            profile_name: self.profile_name,
            profile_version: self.profile_version,
            action: self.action,
            principal: self.principal,
            revision_id: self.revision_id,
            statement_id: self.statement_id,
        })
    }
}