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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about a repository association. The <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_DescribeRepositoryAssociation.html">DescribeRepositoryAssociation</a> operation returns a <code>RepositoryAssociation</code> object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RepositoryAssociation {
    /// <p>The ID of the repository association.</p>
    pub association_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) identifying the repository association.</p>
    pub association_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is <code>arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id</code>. For more information, see <a href="https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html">Connection</a> in the <i>Amazon Web Services CodeStar Connections API Reference</i>.</p>
    pub connection_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the repository.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>The provider type of the repository association.</p>
    pub provider_type: ::std::option::Option<crate::types::ProviderType>,
    /// <p>The state of the repository association.</p>
    /// <p>The valid repository association states are:</p>
    /// <ul>
    /// <li>
    /// <p><b>Associated</b>: The repository association is complete.</p></li>
    /// <li>
    /// <p><b>Associating</b>: CodeGuru Reviewer is:</p>
    /// <ul>
    /// <li>
    /// <p>Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.</p><note>
    /// <p>If your repository <code>ProviderType</code> is <code>GitHub</code>, <code>GitHub Enterprise Server</code>, or <code>Bitbucket</code>, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.</p>
    /// </note></li>
    /// <li>
    /// <p>Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Failed</b>: The repository failed to associate or disassociate.</p></li>
    /// <li>
    /// <p><b>Disassociating</b>: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.</p></li>
    /// <li>
    /// <p><b>Disassociated</b>: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html">Using tags to control access to associated repositories</a> in the <i>Amazon CodeGuru Reviewer User Guide</i>.</p></li>
    /// </ul>
    pub state: ::std::option::Option<crate::types::RepositoryAssociationState>,
    /// <p>A description of why the repository association is in the current state.</p>
    pub state_reason: ::std::option::Option<::std::string::String>,
    /// <p>The time, in milliseconds since the epoch, when the repository association was last updated.</p>
    pub last_updated_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time, in milliseconds since the epoch, when the repository association was created.</p>
    pub created_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A <code>KMSKeyDetails</code> object that contains:</p>
    /// <ul>
    /// <li>
    /// <p>The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (<code>AWS_OWNED_CMK</code>) or customer managed (<code>CUSTOMER_MANAGED_CMK</code>).</p></li>
    /// <li>
    /// <p>The ID of the Amazon Web Services KMS key that is associated with this repository association.</p></li>
    /// </ul>
    pub kms_key_details: ::std::option::Option<crate::types::KmsKeyDetails>,
    /// <p>Specifies the name of an S3 bucket and a <code>CodeArtifacts</code> object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.</p>
    pub s3_repository_details: ::std::option::Option<crate::types::S3RepositoryDetails>,
}
impl RepositoryAssociation {
    /// <p>The ID of the repository association.</p>
    pub fn association_id(&self) -> ::std::option::Option<&str> {
        self.association_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) identifying the repository association.</p>
    pub fn association_arn(&self) -> ::std::option::Option<&str> {
        self.association_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is <code>arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id</code>. For more information, see <a href="https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html">Connection</a> in the <i>Amazon Web Services CodeStar Connections API Reference</i>.</p>
    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
        self.connection_arn.as_deref()
    }
    /// <p>The name of the repository.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The provider type of the repository association.</p>
    pub fn provider_type(&self) -> ::std::option::Option<&crate::types::ProviderType> {
        self.provider_type.as_ref()
    }
    /// <p>The state of the repository association.</p>
    /// <p>The valid repository association states are:</p>
    /// <ul>
    /// <li>
    /// <p><b>Associated</b>: The repository association is complete.</p></li>
    /// <li>
    /// <p><b>Associating</b>: CodeGuru Reviewer is:</p>
    /// <ul>
    /// <li>
    /// <p>Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.</p><note>
    /// <p>If your repository <code>ProviderType</code> is <code>GitHub</code>, <code>GitHub Enterprise Server</code>, or <code>Bitbucket</code>, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.</p>
    /// </note></li>
    /// <li>
    /// <p>Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Failed</b>: The repository failed to associate or disassociate.</p></li>
    /// <li>
    /// <p><b>Disassociating</b>: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.</p></li>
    /// <li>
    /// <p><b>Disassociated</b>: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html">Using tags to control access to associated repositories</a> in the <i>Amazon CodeGuru Reviewer User Guide</i>.</p></li>
    /// </ul>
    pub fn state(&self) -> ::std::option::Option<&crate::types::RepositoryAssociationState> {
        self.state.as_ref()
    }
    /// <p>A description of why the repository association is in the current state.</p>
    pub fn state_reason(&self) -> ::std::option::Option<&str> {
        self.state_reason.as_deref()
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was last updated.</p>
    pub fn last_updated_time_stamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time_stamp.as_ref()
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was created.</p>
    pub fn created_time_stamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time_stamp.as_ref()
    }
    /// <p>A <code>KMSKeyDetails</code> object that contains:</p>
    /// <ul>
    /// <li>
    /// <p>The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (<code>AWS_OWNED_CMK</code>) or customer managed (<code>CUSTOMER_MANAGED_CMK</code>).</p></li>
    /// <li>
    /// <p>The ID of the Amazon Web Services KMS key that is associated with this repository association.</p></li>
    /// </ul>
    pub fn kms_key_details(&self) -> ::std::option::Option<&crate::types::KmsKeyDetails> {
        self.kms_key_details.as_ref()
    }
    /// <p>Specifies the name of an S3 bucket and a <code>CodeArtifacts</code> object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.</p>
    pub fn s3_repository_details(&self) -> ::std::option::Option<&crate::types::S3RepositoryDetails> {
        self.s3_repository_details.as_ref()
    }
}
impl RepositoryAssociation {
    /// Creates a new builder-style object to manufacture [`RepositoryAssociation`](crate::types::RepositoryAssociation).
    pub fn builder() -> crate::types::builders::RepositoryAssociationBuilder {
        crate::types::builders::RepositoryAssociationBuilder::default()
    }
}

/// A builder for [`RepositoryAssociation`](crate::types::RepositoryAssociation).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RepositoryAssociationBuilder {
    pub(crate) association_id: ::std::option::Option<::std::string::String>,
    pub(crate) association_arn: ::std::option::Option<::std::string::String>,
    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) provider_type: ::std::option::Option<crate::types::ProviderType>,
    pub(crate) state: ::std::option::Option<crate::types::RepositoryAssociationState>,
    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) kms_key_details: ::std::option::Option<crate::types::KmsKeyDetails>,
    pub(crate) s3_repository_details: ::std::option::Option<crate::types::S3RepositoryDetails>,
}
impl RepositoryAssociationBuilder {
    /// <p>The ID of the repository association.</p>
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the repository association.</p>
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.association_id = input;
        self
    }
    /// <p>The ID of the repository association.</p>
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.association_id
    }
    /// <p>The Amazon Resource Name (ARN) identifying the repository association.</p>
    pub fn association_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.association_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) identifying the repository association.</p>
    pub fn set_association_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.association_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) identifying the repository association.</p>
    pub fn get_association_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.association_arn
    }
    /// <p>The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is <code>arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id</code>. For more information, see <a href="https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html">Connection</a> in the <i>Amazon Web Services CodeStar Connections API Reference</i>.</p>
    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is <code>arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id</code>. For more information, see <a href="https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html">Connection</a> in the <i>Amazon Web Services CodeStar Connections API Reference</i>.</p>
    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is <code>arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id</code>. For more information, see <a href="https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html">Connection</a> in the <i>Amazon Web Services CodeStar Connections API Reference</i>.</p>
    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_arn
    }
    /// <p>The name of the repository.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the repository.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>The provider type of the repository association.</p>
    pub fn provider_type(mut self, input: crate::types::ProviderType) -> Self {
        self.provider_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The provider type of the repository association.</p>
    pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ProviderType>) -> Self {
        self.provider_type = input;
        self
    }
    /// <p>The provider type of the repository association.</p>
    pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ProviderType> {
        &self.provider_type
    }
    /// <p>The state of the repository association.</p>
    /// <p>The valid repository association states are:</p>
    /// <ul>
    /// <li>
    /// <p><b>Associated</b>: The repository association is complete.</p></li>
    /// <li>
    /// <p><b>Associating</b>: CodeGuru Reviewer is:</p>
    /// <ul>
    /// <li>
    /// <p>Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.</p><note>
    /// <p>If your repository <code>ProviderType</code> is <code>GitHub</code>, <code>GitHub Enterprise Server</code>, or <code>Bitbucket</code>, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.</p>
    /// </note></li>
    /// <li>
    /// <p>Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Failed</b>: The repository failed to associate or disassociate.</p></li>
    /// <li>
    /// <p><b>Disassociating</b>: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.</p></li>
    /// <li>
    /// <p><b>Disassociated</b>: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html">Using tags to control access to associated repositories</a> in the <i>Amazon CodeGuru Reviewer User Guide</i>.</p></li>
    /// </ul>
    pub fn state(mut self, input: crate::types::RepositoryAssociationState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the repository association.</p>
    /// <p>The valid repository association states are:</p>
    /// <ul>
    /// <li>
    /// <p><b>Associated</b>: The repository association is complete.</p></li>
    /// <li>
    /// <p><b>Associating</b>: CodeGuru Reviewer is:</p>
    /// <ul>
    /// <li>
    /// <p>Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.</p><note>
    /// <p>If your repository <code>ProviderType</code> is <code>GitHub</code>, <code>GitHub Enterprise Server</code>, or <code>Bitbucket</code>, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.</p>
    /// </note></li>
    /// <li>
    /// <p>Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Failed</b>: The repository failed to associate or disassociate.</p></li>
    /// <li>
    /// <p><b>Disassociating</b>: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.</p></li>
    /// <li>
    /// <p><b>Disassociated</b>: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html">Using tags to control access to associated repositories</a> in the <i>Amazon CodeGuru Reviewer User Guide</i>.</p></li>
    /// </ul>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::RepositoryAssociationState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the repository association.</p>
    /// <p>The valid repository association states are:</p>
    /// <ul>
    /// <li>
    /// <p><b>Associated</b>: The repository association is complete.</p></li>
    /// <li>
    /// <p><b>Associating</b>: CodeGuru Reviewer is:</p>
    /// <ul>
    /// <li>
    /// <p>Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.</p><note>
    /// <p>If your repository <code>ProviderType</code> is <code>GitHub</code>, <code>GitHub Enterprise Server</code>, or <code>Bitbucket</code>, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.</p>
    /// </note></li>
    /// <li>
    /// <p>Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Failed</b>: The repository failed to associate or disassociate.</p></li>
    /// <li>
    /// <p><b>Disassociating</b>: CodeGuru Reviewer is removing the repository's pull request notifications and source code access.</p></li>
    /// <li>
    /// <p><b>Disassociated</b>: CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html">Using tags to control access to associated repositories</a> in the <i>Amazon CodeGuru Reviewer User Guide</i>.</p></li>
    /// </ul>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::RepositoryAssociationState> {
        &self.state
    }
    /// <p>A description of why the repository association is in the current state.</p>
    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of why the repository association is in the current state.</p>
    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_reason = input;
        self
    }
    /// <p>A description of why the repository association is in the current state.</p>
    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_reason
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was last updated.</p>
    pub fn last_updated_time_stamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time_stamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was last updated.</p>
    pub fn set_last_updated_time_stamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time_stamp = input;
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was last updated.</p>
    pub fn get_last_updated_time_stamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time_stamp
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was created.</p>
    pub fn created_time_stamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time_stamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was created.</p>
    pub fn set_created_time_stamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time_stamp = input;
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the repository association was created.</p>
    pub fn get_created_time_stamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time_stamp
    }
    /// <p>A <code>KMSKeyDetails</code> object that contains:</p>
    /// <ul>
    /// <li>
    /// <p>The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (<code>AWS_OWNED_CMK</code>) or customer managed (<code>CUSTOMER_MANAGED_CMK</code>).</p></li>
    /// <li>
    /// <p>The ID of the Amazon Web Services KMS key that is associated with this repository association.</p></li>
    /// </ul>
    pub fn kms_key_details(mut self, input: crate::types::KmsKeyDetails) -> Self {
        self.kms_key_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>KMSKeyDetails</code> object that contains:</p>
    /// <ul>
    /// <li>
    /// <p>The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (<code>AWS_OWNED_CMK</code>) or customer managed (<code>CUSTOMER_MANAGED_CMK</code>).</p></li>
    /// <li>
    /// <p>The ID of the Amazon Web Services KMS key that is associated with this repository association.</p></li>
    /// </ul>
    pub fn set_kms_key_details(mut self, input: ::std::option::Option<crate::types::KmsKeyDetails>) -> Self {
        self.kms_key_details = input;
        self
    }
    /// <p>A <code>KMSKeyDetails</code> object that contains:</p>
    /// <ul>
    /// <li>
    /// <p>The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (<code>AWS_OWNED_CMK</code>) or customer managed (<code>CUSTOMER_MANAGED_CMK</code>).</p></li>
    /// <li>
    /// <p>The ID of the Amazon Web Services KMS key that is associated with this repository association.</p></li>
    /// </ul>
    pub fn get_kms_key_details(&self) -> &::std::option::Option<crate::types::KmsKeyDetails> {
        &self.kms_key_details
    }
    /// <p>Specifies the name of an S3 bucket and a <code>CodeArtifacts</code> object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.</p>
    pub fn s3_repository_details(mut self, input: crate::types::S3RepositoryDetails) -> Self {
        self.s3_repository_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the name of an S3 bucket and a <code>CodeArtifacts</code> object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.</p>
    pub fn set_s3_repository_details(mut self, input: ::std::option::Option<crate::types::S3RepositoryDetails>) -> Self {
        self.s3_repository_details = input;
        self
    }
    /// <p>Specifies the name of an S3 bucket and a <code>CodeArtifacts</code> object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.</p>
    pub fn get_s3_repository_details(&self) -> &::std::option::Option<crate::types::S3RepositoryDetails> {
        &self.s3_repository_details
    }
    /// Consumes the builder and constructs a [`RepositoryAssociation`](crate::types::RepositoryAssociation).
    pub fn build(self) -> crate::types::RepositoryAssociation {
        crate::types::RepositoryAssociation {
            association_id: self.association_id,
            association_arn: self.association_arn,
            connection_arn: self.connection_arn,
            name: self.name,
            owner: self.owner,
            provider_type: self.provider_type,
            state: self.state,
            state_reason: self.state_reason,
            last_updated_time_stamp: self.last_updated_time_stamp,
            created_time_stamp: self.created_time_stamp,
            kms_key_details: self.kms_key_details,
            s3_repository_details: self.s3_repository_details,
        }
    }
}