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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p> Information about S3 logs for a build project. </p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct S3LogsConfig {
    /// <p>The current status of the S3 build logs. Valid values are:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code>: S3 build logs are enabled for this build project.</p> </li>
    /// <li> <p> <code>DISABLED</code>: S3 build logs are not enabled for this build project.</p> </li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::LogsConfigStatusType>,
    /// <p> The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is <code>my-bucket</code>, and your path prefix is <code>build-log</code>, then acceptable formats are <code>my-bucket/build-log</code> or <code>arn:aws:s3:::my-bucket/build-log</code>. </p>
    pub location: ::std::option::Option<::std::string::String>,
    /// <p> Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted. </p>
    pub encryption_disabled: ::std::option::Option<bool>,
    /// <p>Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.</p> <note>
    /// <p>To use this property, your CodeBuild service role must have the <code>s3:PutBucketAcl</code> permission. This permission allows CodeBuild to modify the access control list for the bucket.</p>
    /// </note>
    /// <p>This property can be one of the following values:</p>
    /// <dl>
    /// <dt>
    /// NONE
    /// </dt>
    /// <dd>
    /// <p>The bucket owner does not have access to the objects. This is the default.</p>
    /// </dd>
    /// <dt>
    /// READ_ONLY
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.</p>
    /// </dd>
    /// <dt>
    /// FULL
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has full access to the objects. Object ownership is determined by the following criteria:</p>
    /// <ul>
    /// <li> <p>If the bucket is configured with the <b>Bucket owner preferred</b> setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.</p> </li>
    /// <li> <p>Otherwise, the uploading account retains ownership of the objects.</p> </li>
    /// </ul>
    /// <p>For more information about Amazon S3 object ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of uploaded objects using S3 Object Ownership</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
    /// </dd>
    /// </dl>
    pub bucket_owner_access: ::std::option::Option<crate::types::BucketOwnerAccess>,
}
impl S3LogsConfig {
    /// <p>The current status of the S3 build logs. Valid values are:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code>: S3 build logs are enabled for this build project.</p> </li>
    /// <li> <p> <code>DISABLED</code>: S3 build logs are not enabled for this build project.</p> </li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::LogsConfigStatusType> {
        self.status.as_ref()
    }
    /// <p> The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is <code>my-bucket</code>, and your path prefix is <code>build-log</code>, then acceptable formats are <code>my-bucket/build-log</code> or <code>arn:aws:s3:::my-bucket/build-log</code>. </p>
    pub fn location(&self) -> ::std::option::Option<&str> {
        self.location.as_deref()
    }
    /// <p> Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted. </p>
    pub fn encryption_disabled(&self) -> ::std::option::Option<bool> {
        self.encryption_disabled
    }
    /// <p>Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.</p> <note>
    /// <p>To use this property, your CodeBuild service role must have the <code>s3:PutBucketAcl</code> permission. This permission allows CodeBuild to modify the access control list for the bucket.</p>
    /// </note>
    /// <p>This property can be one of the following values:</p>
    /// <dl>
    /// <dt>
    /// NONE
    /// </dt>
    /// <dd>
    /// <p>The bucket owner does not have access to the objects. This is the default.</p>
    /// </dd>
    /// <dt>
    /// READ_ONLY
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.</p>
    /// </dd>
    /// <dt>
    /// FULL
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has full access to the objects. Object ownership is determined by the following criteria:</p>
    /// <ul>
    /// <li> <p>If the bucket is configured with the <b>Bucket owner preferred</b> setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.</p> </li>
    /// <li> <p>Otherwise, the uploading account retains ownership of the objects.</p> </li>
    /// </ul>
    /// <p>For more information about Amazon S3 object ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of uploaded objects using S3 Object Ownership</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
    /// </dd>
    /// </dl>
    pub fn bucket_owner_access(&self) -> ::std::option::Option<&crate::types::BucketOwnerAccess> {
        self.bucket_owner_access.as_ref()
    }
}
impl S3LogsConfig {
    /// Creates a new builder-style object to manufacture [`S3LogsConfig`](crate::types::S3LogsConfig).
    pub fn builder() -> crate::types::builders::S3LogsConfigBuilder {
        crate::types::builders::S3LogsConfigBuilder::default()
    }
}

/// A builder for [`S3LogsConfig`](crate::types::S3LogsConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct S3LogsConfigBuilder {
    pub(crate) status: ::std::option::Option<crate::types::LogsConfigStatusType>,
    pub(crate) location: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_disabled: ::std::option::Option<bool>,
    pub(crate) bucket_owner_access: ::std::option::Option<crate::types::BucketOwnerAccess>,
}
impl S3LogsConfigBuilder {
    /// <p>The current status of the S3 build logs. Valid values are:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code>: S3 build logs are enabled for this build project.</p> </li>
    /// <li> <p> <code>DISABLED</code>: S3 build logs are not enabled for this build project.</p> </li>
    /// </ul>
    pub fn status(mut self, input: crate::types::LogsConfigStatusType) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the S3 build logs. Valid values are:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code>: S3 build logs are enabled for this build project.</p> </li>
    /// <li> <p> <code>DISABLED</code>: S3 build logs are not enabled for this build project.</p> </li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LogsConfigStatusType>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the S3 build logs. Valid values are:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code>: S3 build logs are enabled for this build project.</p> </li>
    /// <li> <p> <code>DISABLED</code>: S3 build logs are not enabled for this build project.</p> </li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LogsConfigStatusType> {
        &self.status
    }
    /// <p> The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is <code>my-bucket</code>, and your path prefix is <code>build-log</code>, then acceptable formats are <code>my-bucket/build-log</code> or <code>arn:aws:s3:::my-bucket/build-log</code>. </p>
    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.location = ::std::option::Option::Some(input.into());
        self
    }
    /// <p> The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is <code>my-bucket</code>, and your path prefix is <code>build-log</code>, then acceptable formats are <code>my-bucket/build-log</code> or <code>arn:aws:s3:::my-bucket/build-log</code>. </p>
    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.location = input;
        self
    }
    /// <p> The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is <code>my-bucket</code>, and your path prefix is <code>build-log</code>, then acceptable formats are <code>my-bucket/build-log</code> or <code>arn:aws:s3:::my-bucket/build-log</code>. </p>
    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
        &self.location
    }
    /// <p> Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted. </p>
    pub fn encryption_disabled(mut self, input: bool) -> Self {
        self.encryption_disabled = ::std::option::Option::Some(input);
        self
    }
    /// <p> Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted. </p>
    pub fn set_encryption_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.encryption_disabled = input;
        self
    }
    /// <p> Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted. </p>
    pub fn get_encryption_disabled(&self) -> &::std::option::Option<bool> {
        &self.encryption_disabled
    }
    /// <p>Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.</p> <note>
    /// <p>To use this property, your CodeBuild service role must have the <code>s3:PutBucketAcl</code> permission. This permission allows CodeBuild to modify the access control list for the bucket.</p>
    /// </note>
    /// <p>This property can be one of the following values:</p>
    /// <dl>
    /// <dt>
    /// NONE
    /// </dt>
    /// <dd>
    /// <p>The bucket owner does not have access to the objects. This is the default.</p>
    /// </dd>
    /// <dt>
    /// READ_ONLY
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.</p>
    /// </dd>
    /// <dt>
    /// FULL
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has full access to the objects. Object ownership is determined by the following criteria:</p>
    /// <ul>
    /// <li> <p>If the bucket is configured with the <b>Bucket owner preferred</b> setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.</p> </li>
    /// <li> <p>Otherwise, the uploading account retains ownership of the objects.</p> </li>
    /// </ul>
    /// <p>For more information about Amazon S3 object ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of uploaded objects using S3 Object Ownership</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
    /// </dd>
    /// </dl>
    pub fn bucket_owner_access(mut self, input: crate::types::BucketOwnerAccess) -> Self {
        self.bucket_owner_access = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.</p> <note>
    /// <p>To use this property, your CodeBuild service role must have the <code>s3:PutBucketAcl</code> permission. This permission allows CodeBuild to modify the access control list for the bucket.</p>
    /// </note>
    /// <p>This property can be one of the following values:</p>
    /// <dl>
    /// <dt>
    /// NONE
    /// </dt>
    /// <dd>
    /// <p>The bucket owner does not have access to the objects. This is the default.</p>
    /// </dd>
    /// <dt>
    /// READ_ONLY
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.</p>
    /// </dd>
    /// <dt>
    /// FULL
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has full access to the objects. Object ownership is determined by the following criteria:</p>
    /// <ul>
    /// <li> <p>If the bucket is configured with the <b>Bucket owner preferred</b> setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.</p> </li>
    /// <li> <p>Otherwise, the uploading account retains ownership of the objects.</p> </li>
    /// </ul>
    /// <p>For more information about Amazon S3 object ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of uploaded objects using S3 Object Ownership</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
    /// </dd>
    /// </dl>
    pub fn set_bucket_owner_access(mut self, input: ::std::option::Option<crate::types::BucketOwnerAccess>) -> Self {
        self.bucket_owner_access = input;
        self
    }
    /// <p>Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.</p> <note>
    /// <p>To use this property, your CodeBuild service role must have the <code>s3:PutBucketAcl</code> permission. This permission allows CodeBuild to modify the access control list for the bucket.</p>
    /// </note>
    /// <p>This property can be one of the following values:</p>
    /// <dl>
    /// <dt>
    /// NONE
    /// </dt>
    /// <dd>
    /// <p>The bucket owner does not have access to the objects. This is the default.</p>
    /// </dd>
    /// <dt>
    /// READ_ONLY
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.</p>
    /// </dd>
    /// <dt>
    /// FULL
    /// </dt>
    /// <dd>
    /// <p>The bucket owner has full access to the objects. Object ownership is determined by the following criteria:</p>
    /// <ul>
    /// <li> <p>If the bucket is configured with the <b>Bucket owner preferred</b> setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.</p> </li>
    /// <li> <p>Otherwise, the uploading account retains ownership of the objects.</p> </li>
    /// </ul>
    /// <p>For more information about Amazon S3 object ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of uploaded objects using S3 Object Ownership</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
    /// </dd>
    /// </dl>
    pub fn get_bucket_owner_access(&self) -> &::std::option::Option<crate::types::BucketOwnerAccess> {
        &self.bucket_owner_access
    }
    /// Consumes the builder and constructs a [`S3LogsConfig`](crate::types::S3LogsConfig).
    pub fn build(self) -> crate::types::S3LogsConfig {
        crate::types::S3LogsConfig {
            status: self.status,
            location: self.location,
            encryption_disabled: self.encryption_disabled,
            bucket_owner_access: self.bucket_owner_access,
        }
    }
}