aws_sdk_codebuild/operation/update_project/
_update_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateProjectInput {
6    /// <p>The name of the build project.</p><note>
7    /// <p>You cannot change a build project's name.</p>
8    /// </note>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>A new or replacement description of the build project.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>Information to be changed about the build input source code for the build project.</p>
13    pub source: ::std::option::Option<crate::types::ProjectSource>,
14    /// <p>An array of <code>ProjectSource</code> objects.</p>
15    pub secondary_sources: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>,
16    /// <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:</p>
17    /// <ul>
18    /// <li>
19    /// <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li>
20    /// <li>
21    /// <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
22    /// <li>
23    /// <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li>
24    /// <li>
25    /// <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
26    /// <li>
27    /// <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li>
28    /// </ul>
29    /// <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p>
30    /// <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p>
31    pub source_version: ::std::option::Option<::std::string::String>,
32    /// <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level).</p>
33    pub secondary_source_versions: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>,
34    /// <p>Information to be changed about the build output artifacts for the build project.</p>
35    pub artifacts: ::std::option::Option<crate::types::ProjectArtifacts>,
36    /// <p>An array of <code>ProjectArtifact</code> objects.</p>
37    pub secondary_artifacts: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>,
38    /// <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
39    pub cache: ::std::option::Option<crate::types::ProjectCache>,
40    /// <p>Information to be changed about the build environment for the build project.</p>
41    pub environment: ::std::option::Option<crate::types::ProjectEnvironment>,
42    /// <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
43    pub service_role: ::std::option::Option<::std::string::String>,
44    /// <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
45    pub timeout_in_minutes: ::std::option::Option<i32>,
46    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
47    pub queued_timeout_in_minutes: ::std::option::Option<i32>,
48    /// <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note>
49    /// <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p>
50    /// </note>
51    /// <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p>
52    pub encryption_key: ::std::option::Option<::std::string::String>,
53    /// <p>An updated list of tag key and value pairs associated with this build project.</p>
54    /// <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
55    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
56    /// <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
57    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
58    /// <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
59    pub badge_enabled: ::std::option::Option<bool>,
60    /// <p>Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.</p>
61    pub logs_config: ::std::option::Option<crate::types::LogsConfig>,
62    /// <p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p>
63    pub file_system_locations: ::std::option::Option<::std::vec::Vec<crate::types::ProjectFileSystemLocation>>,
64    /// <p>Contains configuration information about a batch build project.</p>
65    pub build_batch_config: ::std::option::Option<crate::types::ProjectBuildBatchConfig>,
66    /// <p>The maximum number of concurrent builds that are allowed for this project.</p>
67    /// <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
68    /// <p>To remove this limit, set this value to -1.</p>
69    pub concurrent_build_limit: ::std::option::Option<i32>,
70    /// <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
71    pub auto_retry_limit: ::std::option::Option<i32>,
72}
73impl UpdateProjectInput {
74    /// <p>The name of the build project.</p><note>
75    /// <p>You cannot change a build project's name.</p>
76    /// </note>
77    pub fn name(&self) -> ::std::option::Option<&str> {
78        self.name.as_deref()
79    }
80    /// <p>A new or replacement description of the build project.</p>
81    pub fn description(&self) -> ::std::option::Option<&str> {
82        self.description.as_deref()
83    }
84    /// <p>Information to be changed about the build input source code for the build project.</p>
85    pub fn source(&self) -> ::std::option::Option<&crate::types::ProjectSource> {
86        self.source.as_ref()
87    }
88    /// <p>An array of <code>ProjectSource</code> objects.</p>
89    ///
90    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.secondary_sources.is_none()`.
91    pub fn secondary_sources(&self) -> &[crate::types::ProjectSource] {
92        self.secondary_sources.as_deref().unwrap_or_default()
93    }
94    /// <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:</p>
95    /// <ul>
96    /// <li>
97    /// <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li>
98    /// <li>
99    /// <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
100    /// <li>
101    /// <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li>
102    /// <li>
103    /// <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
104    /// <li>
105    /// <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li>
106    /// </ul>
107    /// <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p>
108    /// <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p>
109    pub fn source_version(&self) -> ::std::option::Option<&str> {
110        self.source_version.as_deref()
111    }
112    /// <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level).</p>
113    ///
114    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.secondary_source_versions.is_none()`.
115    pub fn secondary_source_versions(&self) -> &[crate::types::ProjectSourceVersion] {
116        self.secondary_source_versions.as_deref().unwrap_or_default()
117    }
118    /// <p>Information to be changed about the build output artifacts for the build project.</p>
119    pub fn artifacts(&self) -> ::std::option::Option<&crate::types::ProjectArtifacts> {
120        self.artifacts.as_ref()
121    }
122    /// <p>An array of <code>ProjectArtifact</code> objects.</p>
123    ///
124    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.secondary_artifacts.is_none()`.
125    pub fn secondary_artifacts(&self) -> &[crate::types::ProjectArtifacts] {
126        self.secondary_artifacts.as_deref().unwrap_or_default()
127    }
128    /// <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
129    pub fn cache(&self) -> ::std::option::Option<&crate::types::ProjectCache> {
130        self.cache.as_ref()
131    }
132    /// <p>Information to be changed about the build environment for the build project.</p>
133    pub fn environment(&self) -> ::std::option::Option<&crate::types::ProjectEnvironment> {
134        self.environment.as_ref()
135    }
136    /// <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
137    pub fn service_role(&self) -> ::std::option::Option<&str> {
138        self.service_role.as_deref()
139    }
140    /// <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
141    pub fn timeout_in_minutes(&self) -> ::std::option::Option<i32> {
142        self.timeout_in_minutes
143    }
144    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
145    pub fn queued_timeout_in_minutes(&self) -> ::std::option::Option<i32> {
146        self.queued_timeout_in_minutes
147    }
148    /// <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note>
149    /// <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p>
150    /// </note>
151    /// <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p>
152    pub fn encryption_key(&self) -> ::std::option::Option<&str> {
153        self.encryption_key.as_deref()
154    }
155    /// <p>An updated list of tag key and value pairs associated with this build project.</p>
156    /// <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
157    ///
158    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
159    pub fn tags(&self) -> &[crate::types::Tag] {
160        self.tags.as_deref().unwrap_or_default()
161    }
162    /// <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
163    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
164        self.vpc_config.as_ref()
165    }
166    /// <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
167    pub fn badge_enabled(&self) -> ::std::option::Option<bool> {
168        self.badge_enabled
169    }
170    /// <p>Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.</p>
171    pub fn logs_config(&self) -> ::std::option::Option<&crate::types::LogsConfig> {
172        self.logs_config.as_ref()
173    }
174    /// <p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p>
175    ///
176    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.file_system_locations.is_none()`.
177    pub fn file_system_locations(&self) -> &[crate::types::ProjectFileSystemLocation] {
178        self.file_system_locations.as_deref().unwrap_or_default()
179    }
180    /// <p>Contains configuration information about a batch build project.</p>
181    pub fn build_batch_config(&self) -> ::std::option::Option<&crate::types::ProjectBuildBatchConfig> {
182        self.build_batch_config.as_ref()
183    }
184    /// <p>The maximum number of concurrent builds that are allowed for this project.</p>
185    /// <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
186    /// <p>To remove this limit, set this value to -1.</p>
187    pub fn concurrent_build_limit(&self) -> ::std::option::Option<i32> {
188        self.concurrent_build_limit
189    }
190    /// <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
191    pub fn auto_retry_limit(&self) -> ::std::option::Option<i32> {
192        self.auto_retry_limit
193    }
194}
195impl UpdateProjectInput {
196    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
197    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
198        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
199    }
200}
201
202/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
203#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
204#[non_exhaustive]
205pub struct UpdateProjectInputBuilder {
206    pub(crate) name: ::std::option::Option<::std::string::String>,
207    pub(crate) description: ::std::option::Option<::std::string::String>,
208    pub(crate) source: ::std::option::Option<crate::types::ProjectSource>,
209    pub(crate) secondary_sources: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>,
210    pub(crate) source_version: ::std::option::Option<::std::string::String>,
211    pub(crate) secondary_source_versions: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>,
212    pub(crate) artifacts: ::std::option::Option<crate::types::ProjectArtifacts>,
213    pub(crate) secondary_artifacts: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>,
214    pub(crate) cache: ::std::option::Option<crate::types::ProjectCache>,
215    pub(crate) environment: ::std::option::Option<crate::types::ProjectEnvironment>,
216    pub(crate) service_role: ::std::option::Option<::std::string::String>,
217    pub(crate) timeout_in_minutes: ::std::option::Option<i32>,
218    pub(crate) queued_timeout_in_minutes: ::std::option::Option<i32>,
219    pub(crate) encryption_key: ::std::option::Option<::std::string::String>,
220    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
221    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
222    pub(crate) badge_enabled: ::std::option::Option<bool>,
223    pub(crate) logs_config: ::std::option::Option<crate::types::LogsConfig>,
224    pub(crate) file_system_locations: ::std::option::Option<::std::vec::Vec<crate::types::ProjectFileSystemLocation>>,
225    pub(crate) build_batch_config: ::std::option::Option<crate::types::ProjectBuildBatchConfig>,
226    pub(crate) concurrent_build_limit: ::std::option::Option<i32>,
227    pub(crate) auto_retry_limit: ::std::option::Option<i32>,
228}
229impl UpdateProjectInputBuilder {
230    /// <p>The name of the build project.</p><note>
231    /// <p>You cannot change a build project's name.</p>
232    /// </note>
233    /// This field is required.
234    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        self.name = ::std::option::Option::Some(input.into());
236        self
237    }
238    /// <p>The name of the build project.</p><note>
239    /// <p>You cannot change a build project's name.</p>
240    /// </note>
241    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242        self.name = input;
243        self
244    }
245    /// <p>The name of the build project.</p><note>
246    /// <p>You cannot change a build project's name.</p>
247    /// </note>
248    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
249        &self.name
250    }
251    /// <p>A new or replacement description of the build project.</p>
252    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.description = ::std::option::Option::Some(input.into());
254        self
255    }
256    /// <p>A new or replacement description of the build project.</p>
257    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.description = input;
259        self
260    }
261    /// <p>A new or replacement description of the build project.</p>
262    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
263        &self.description
264    }
265    /// <p>Information to be changed about the build input source code for the build project.</p>
266    pub fn source(mut self, input: crate::types::ProjectSource) -> Self {
267        self.source = ::std::option::Option::Some(input);
268        self
269    }
270    /// <p>Information to be changed about the build input source code for the build project.</p>
271    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ProjectSource>) -> Self {
272        self.source = input;
273        self
274    }
275    /// <p>Information to be changed about the build input source code for the build project.</p>
276    pub fn get_source(&self) -> &::std::option::Option<crate::types::ProjectSource> {
277        &self.source
278    }
279    /// Appends an item to `secondary_sources`.
280    ///
281    /// To override the contents of this collection use [`set_secondary_sources`](Self::set_secondary_sources).
282    ///
283    /// <p>An array of <code>ProjectSource</code> objects.</p>
284    pub fn secondary_sources(mut self, input: crate::types::ProjectSource) -> Self {
285        let mut v = self.secondary_sources.unwrap_or_default();
286        v.push(input);
287        self.secondary_sources = ::std::option::Option::Some(v);
288        self
289    }
290    /// <p>An array of <code>ProjectSource</code> objects.</p>
291    pub fn set_secondary_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>) -> Self {
292        self.secondary_sources = input;
293        self
294    }
295    /// <p>An array of <code>ProjectSource</code> objects.</p>
296    pub fn get_secondary_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>> {
297        &self.secondary_sources
298    }
299    /// <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:</p>
300    /// <ul>
301    /// <li>
302    /// <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li>
303    /// <li>
304    /// <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
305    /// <li>
306    /// <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li>
307    /// <li>
308    /// <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
309    /// <li>
310    /// <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li>
311    /// </ul>
312    /// <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p>
313    /// <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p>
314    pub fn source_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315        self.source_version = ::std::option::Option::Some(input.into());
316        self
317    }
318    /// <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:</p>
319    /// <ul>
320    /// <li>
321    /// <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li>
322    /// <li>
323    /// <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
324    /// <li>
325    /// <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li>
326    /// <li>
327    /// <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
328    /// <li>
329    /// <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li>
330    /// </ul>
331    /// <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p>
332    /// <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p>
333    pub fn set_source_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
334        self.source_version = input;
335        self
336    }
337    /// <p>A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:</p>
338    /// <ul>
339    /// <li>
340    /// <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p></li>
341    /// <li>
342    /// <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
343    /// <li>
344    /// <p>For GitLab: the commit ID, branch, or Git tag to use.</p></li>
345    /// <li>
346    /// <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p></li>
347    /// <li>
348    /// <p>For Amazon S3: the version ID of the object that represents the build input ZIP file to use.</p></li>
349    /// </ul>
350    /// <p>If <code>sourceVersion</code> is specified at the build level, then that version takes precedence over this <code>sourceVersion</code> (at the project level).</p>
351    /// <p>For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>.</p>
352    pub fn get_source_version(&self) -> &::std::option::Option<::std::string::String> {
353        &self.source_version
354    }
355    /// Appends an item to `secondary_source_versions`.
356    ///
357    /// To override the contents of this collection use [`set_secondary_source_versions`](Self::set_secondary_source_versions).
358    ///
359    /// <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level).</p>
360    pub fn secondary_source_versions(mut self, input: crate::types::ProjectSourceVersion) -> Self {
361        let mut v = self.secondary_source_versions.unwrap_or_default();
362        v.push(input);
363        self.secondary_source_versions = ::std::option::Option::Some(v);
364        self
365    }
366    /// <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level).</p>
367    pub fn set_secondary_source_versions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>) -> Self {
368        self.secondary_source_versions = input;
369        self
370    }
371    /// <p>An array of <code>ProjectSourceVersion</code> objects. If <code>secondarySourceVersions</code> is specified at the build level, then they take over these <code>secondarySourceVersions</code> (at the project level).</p>
372    pub fn get_secondary_source_versions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>> {
373        &self.secondary_source_versions
374    }
375    /// <p>Information to be changed about the build output artifacts for the build project.</p>
376    pub fn artifacts(mut self, input: crate::types::ProjectArtifacts) -> Self {
377        self.artifacts = ::std::option::Option::Some(input);
378        self
379    }
380    /// <p>Information to be changed about the build output artifacts for the build project.</p>
381    pub fn set_artifacts(mut self, input: ::std::option::Option<crate::types::ProjectArtifacts>) -> Self {
382        self.artifacts = input;
383        self
384    }
385    /// <p>Information to be changed about the build output artifacts for the build project.</p>
386    pub fn get_artifacts(&self) -> &::std::option::Option<crate::types::ProjectArtifacts> {
387        &self.artifacts
388    }
389    /// Appends an item to `secondary_artifacts`.
390    ///
391    /// To override the contents of this collection use [`set_secondary_artifacts`](Self::set_secondary_artifacts).
392    ///
393    /// <p>An array of <code>ProjectArtifact</code> objects.</p>
394    pub fn secondary_artifacts(mut self, input: crate::types::ProjectArtifacts) -> Self {
395        let mut v = self.secondary_artifacts.unwrap_or_default();
396        v.push(input);
397        self.secondary_artifacts = ::std::option::Option::Some(v);
398        self
399    }
400    /// <p>An array of <code>ProjectArtifact</code> objects.</p>
401    pub fn set_secondary_artifacts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>) -> Self {
402        self.secondary_artifacts = input;
403        self
404    }
405    /// <p>An array of <code>ProjectArtifact</code> objects.</p>
406    pub fn get_secondary_artifacts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>> {
407        &self.secondary_artifacts
408    }
409    /// <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
410    pub fn cache(mut self, input: crate::types::ProjectCache) -> Self {
411        self.cache = ::std::option::Option::Some(input);
412        self
413    }
414    /// <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
415    pub fn set_cache(mut self, input: ::std::option::Option<crate::types::ProjectCache>) -> Self {
416        self.cache = input;
417        self
418    }
419    /// <p>Stores recently used information so that it can be quickly accessed at a later time.</p>
420    pub fn get_cache(&self) -> &::std::option::Option<crate::types::ProjectCache> {
421        &self.cache
422    }
423    /// <p>Information to be changed about the build environment for the build project.</p>
424    pub fn environment(mut self, input: crate::types::ProjectEnvironment) -> Self {
425        self.environment = ::std::option::Option::Some(input);
426        self
427    }
428    /// <p>Information to be changed about the build environment for the build project.</p>
429    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::ProjectEnvironment>) -> Self {
430        self.environment = input;
431        self
432    }
433    /// <p>Information to be changed about the build environment for the build project.</p>
434    pub fn get_environment(&self) -> &::std::option::Option<crate::types::ProjectEnvironment> {
435        &self.environment
436    }
437    /// <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
438    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
439        self.service_role = ::std::option::Option::Some(input.into());
440        self
441    }
442    /// <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
443    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
444        self.service_role = input;
445        self
446    }
447    /// <p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>
448    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
449        &self.service_role
450    }
451    /// <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
452    pub fn timeout_in_minutes(mut self, input: i32) -> Self {
453        self.timeout_in_minutes = ::std::option::Option::Some(input);
454        self
455    }
456    /// <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
457    pub fn set_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
458        self.timeout_in_minutes = input;
459        self
460    }
461    /// <p>The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.</p>
462    pub fn get_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
463        &self.timeout_in_minutes
464    }
465    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
466    pub fn queued_timeout_in_minutes(mut self, input: i32) -> Self {
467        self.queued_timeout_in_minutes = ::std::option::Option::Some(input);
468        self
469    }
470    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
471    pub fn set_queued_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
472        self.queued_timeout_in_minutes = input;
473        self
474    }
475    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
476    pub fn get_queued_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
477        &self.queued_timeout_in_minutes
478    }
479    /// <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note>
480    /// <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p>
481    /// </note>
482    /// <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p>
483    pub fn encryption_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
484        self.encryption_key = ::std::option::Option::Some(input.into());
485        self
486    }
487    /// <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note>
488    /// <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p>
489    /// </note>
490    /// <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p>
491    pub fn set_encryption_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492        self.encryption_key = input;
493        self
494    }
495    /// <p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p><note>
496    /// <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.</p>
497    /// </note>
498    /// <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/<alias-name></alias-name></code>).</p>
499    pub fn get_encryption_key(&self) -> &::std::option::Option<::std::string::String> {
500        &self.encryption_key
501    }
502    /// Appends an item to `tags`.
503    ///
504    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
505    ///
506    /// <p>An updated list of tag key and value pairs associated with this build project.</p>
507    /// <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
508    pub fn tags(mut self, input: crate::types::Tag) -> Self {
509        let mut v = self.tags.unwrap_or_default();
510        v.push(input);
511        self.tags = ::std::option::Option::Some(v);
512        self
513    }
514    /// <p>An updated list of tag key and value pairs associated with this build project.</p>
515    /// <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
516    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
517        self.tags = input;
518        self
519    }
520    /// <p>An updated list of tag key and value pairs associated with this build project.</p>
521    /// <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.</p>
522    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
523        &self.tags
524    }
525    /// <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
526    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
527        self.vpc_config = ::std::option::Option::Some(input);
528        self
529    }
530    /// <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
531    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
532        self.vpc_config = input;
533        self
534    }
535    /// <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
536    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
537        &self.vpc_config
538    }
539    /// <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
540    pub fn badge_enabled(mut self, input: bool) -> Self {
541        self.badge_enabled = ::std::option::Option::Some(input);
542        self
543    }
544    /// <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
545    pub fn set_badge_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
546        self.badge_enabled = input;
547        self
548    }
549    /// <p>Set this to true to generate a publicly accessible URL for your project's build badge.</p>
550    pub fn get_badge_enabled(&self) -> &::std::option::Option<bool> {
551        &self.badge_enabled
552    }
553    /// <p>Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.</p>
554    pub fn logs_config(mut self, input: crate::types::LogsConfig) -> Self {
555        self.logs_config = ::std::option::Option::Some(input);
556        self
557    }
558    /// <p>Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.</p>
559    pub fn set_logs_config(mut self, input: ::std::option::Option<crate::types::LogsConfig>) -> Self {
560        self.logs_config = input;
561        self
562    }
563    /// <p>Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.</p>
564    pub fn get_logs_config(&self) -> &::std::option::Option<crate::types::LogsConfig> {
565        &self.logs_config
566    }
567    /// Appends an item to `file_system_locations`.
568    ///
569    /// To override the contents of this collection use [`set_file_system_locations`](Self::set_file_system_locations).
570    ///
571    /// <p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p>
572    pub fn file_system_locations(mut self, input: crate::types::ProjectFileSystemLocation) -> Self {
573        let mut v = self.file_system_locations.unwrap_or_default();
574        v.push(input);
575        self.file_system_locations = ::std::option::Option::Some(v);
576        self
577    }
578    /// <p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p>
579    pub fn set_file_system_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectFileSystemLocation>>) -> Self {
580        self.file_system_locations = input;
581        self
582    }
583    /// <p>An array of <code>ProjectFileSystemLocation</code> objects for a CodeBuild build project. A <code>ProjectFileSystemLocation</code> object specifies the <code>identifier</code>, <code>location</code>, <code>mountOptions</code>, <code>mountPoint</code>, and <code>type</code> of a file system created using Amazon Elastic File System.</p>
584    pub fn get_file_system_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectFileSystemLocation>> {
585        &self.file_system_locations
586    }
587    /// <p>Contains configuration information about a batch build project.</p>
588    pub fn build_batch_config(mut self, input: crate::types::ProjectBuildBatchConfig) -> Self {
589        self.build_batch_config = ::std::option::Option::Some(input);
590        self
591    }
592    /// <p>Contains configuration information about a batch build project.</p>
593    pub fn set_build_batch_config(mut self, input: ::std::option::Option<crate::types::ProjectBuildBatchConfig>) -> Self {
594        self.build_batch_config = input;
595        self
596    }
597    /// <p>Contains configuration information about a batch build project.</p>
598    pub fn get_build_batch_config(&self) -> &::std::option::Option<crate::types::ProjectBuildBatchConfig> {
599        &self.build_batch_config
600    }
601    /// <p>The maximum number of concurrent builds that are allowed for this project.</p>
602    /// <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
603    /// <p>To remove this limit, set this value to -1.</p>
604    pub fn concurrent_build_limit(mut self, input: i32) -> Self {
605        self.concurrent_build_limit = ::std::option::Option::Some(input);
606        self
607    }
608    /// <p>The maximum number of concurrent builds that are allowed for this project.</p>
609    /// <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
610    /// <p>To remove this limit, set this value to -1.</p>
611    pub fn set_concurrent_build_limit(mut self, input: ::std::option::Option<i32>) -> Self {
612        self.concurrent_build_limit = input;
613        self
614    }
615    /// <p>The maximum number of concurrent builds that are allowed for this project.</p>
616    /// <p>New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.</p>
617    /// <p>To remove this limit, set this value to -1.</p>
618    pub fn get_concurrent_build_limit(&self) -> &::std::option::Option<i32> {
619        &self.concurrent_build_limit
620    }
621    /// <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
622    pub fn auto_retry_limit(mut self, input: i32) -> Self {
623        self.auto_retry_limit = ::std::option::Option::Some(input);
624        self
625    }
626    /// <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
627    pub fn set_auto_retry_limit(mut self, input: ::std::option::Option<i32>) -> Self {
628        self.auto_retry_limit = input;
629        self
630    }
631    /// <p>The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically retry your build for up to 2 additional times.</p>
632    pub fn get_auto_retry_limit(&self) -> &::std::option::Option<i32> {
633        &self.auto_retry_limit
634    }
635    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
636    pub fn build(
637        self,
638    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
639        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
640            name: self.name,
641            description: self.description,
642            source: self.source,
643            secondary_sources: self.secondary_sources,
644            source_version: self.source_version,
645            secondary_source_versions: self.secondary_source_versions,
646            artifacts: self.artifacts,
647            secondary_artifacts: self.secondary_artifacts,
648            cache: self.cache,
649            environment: self.environment,
650            service_role: self.service_role,
651            timeout_in_minutes: self.timeout_in_minutes,
652            queued_timeout_in_minutes: self.queued_timeout_in_minutes,
653            encryption_key: self.encryption_key,
654            tags: self.tags,
655            vpc_config: self.vpc_config,
656            badge_enabled: self.badge_enabled,
657            logs_config: self.logs_config,
658            file_system_locations: self.file_system_locations,
659            build_batch_config: self.build_batch_config,
660            concurrent_build_limit: self.concurrent_build_limit,
661            auto_retry_limit: self.auto_retry_limit,
662        })
663    }
664}