aws_sdk_codebuild/operation/start_build/
_start_build_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 StartBuildInput {
6    /// <p>The name of the CodeBuild build project to start running a build.</p>
7    pub project_name: ::std::option::Option<::std::string::String>,
8    /// <p>An array of <code>ProjectSource</code> objects.</p>
9    pub secondary_sources_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>,
10    /// <p>An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only.</p>
11    pub secondary_sources_version_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>,
12    /// <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p>
13    /// <dl>
14    /// <dt>
15    /// CodeCommit
16    /// </dt>
17    /// <dd>
18    /// <p>The commit ID, branch, or Git tag to use.</p>
19    /// </dd>
20    /// <dt>
21    /// GitHub
22    /// </dt>
23    /// <dd>
24    /// <p>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>
25    /// </dd>
26    /// <dt>
27    /// GitLab
28    /// </dt>
29    /// <dd>
30    /// <p>The commit ID, branch, or Git tag to use.</p>
31    /// </dd>
32    /// <dt>
33    /// Bitbucket
34    /// </dt>
35    /// <dd>
36    /// <p>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>
37    /// </dd>
38    /// <dt>
39    /// Amazon S3
40    /// </dt>
41    /// <dd>
42    /// <p>The version ID of the object that represents the build input ZIP file to use.</p>
43    /// </dd>
44    /// </dl>
45    /// <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence.</p>
46    /// <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>
47    pub source_version: ::std::option::Option<::std::string::String>,
48    /// <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
49    pub artifacts_override: ::std::option::Option<crate::types::ProjectArtifacts>,
50    /// <p>An array of <code>ProjectArtifacts</code> objects.</p>
51    pub secondary_artifacts_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>,
52    /// <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
53    pub environment_variables_override: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>>,
54    /// <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
55    pub source_type_override: ::std::option::Option<crate::types::SourceType>,
56    /// <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
57    pub source_location_override: ::std::option::Option<::std::string::String>,
58    /// <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
59    pub source_auth_override: ::std::option::Option<crate::types::SourceAuth>,
60    /// <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
61    pub git_clone_depth_override: ::std::option::Option<i32>,
62    /// <p>Information about the Git submodules configuration for this build of an CodeBuild build project.</p>
63    pub git_submodules_config_override: ::std::option::Option<crate::types::GitSubmodulesConfig>,
64    /// <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p>
65    /// <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage">Buildspec File Name and Storage Location</a>.</p><note>
66    /// <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p>
67    /// </note>
68    pub buildspec_override: ::std::option::Option<::std::string::String>,
69    /// <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
70    pub insecure_ssl_override: ::std::option::Option<bool>,
71    /// <p>Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown.</p>
72    /// <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p><note>
73    /// <p>The status of a build triggered by a webhook is always reported to your source provider.</p>
74    /// </note>
75    pub report_build_status_override: ::std::option::Option<bool>,
76    /// <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
77    pub build_status_config_override: ::std::option::Option<crate::types::BuildStatusConfig>,
78    /// <p>A container type for this build that overrides the one specified in the build project.</p>
79    pub environment_type_override: ::std::option::Option<crate::types::EnvironmentType>,
80    /// <p>The name of an image for this build that overrides the one specified in the build project.</p>
81    pub image_override: ::std::option::Option<::std::string::String>,
82    /// <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
83    pub compute_type_override: ::std::option::Option<crate::types::ComputeType>,
84    /// <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
85    pub certificate_override: ::std::option::Option<::std::string::String>,
86    /// <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
87    pub cache_override: ::std::option::Option<crate::types::ProjectCache>,
88    /// <p>The name of a service role for this build that overrides the one specified in the build project.</p>
89    pub service_role_override: ::std::option::Option<::std::string::String>,
90    /// <p>Enable this flag to override privileged mode in the build project.</p>
91    pub privileged_mode_override: ::std::option::Option<bool>,
92    /// <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
93    pub timeout_in_minutes_override: ::std::option::Option<i32>,
94    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
95    pub queued_timeout_in_minutes_override: ::std::option::Option<i32>,
96    /// <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p><note>
97    /// <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>
98    /// </note>
99    /// <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>
100    pub encryption_key_override: ::std::option::Option<::std::string::String>,
101    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
102    pub idempotency_token: ::std::option::Option<::std::string::String>,
103    /// <p>Log settings for this build that override the log settings defined in the build project.</p>
104    pub logs_config_override: ::std::option::Option<crate::types::LogsConfig>,
105    /// <p>The credentials for access to a private registry.</p>
106    pub registry_credential_override: ::std::option::Option<crate::types::RegistryCredential>,
107    /// <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values:</p>
108    /// <dl>
109    /// <dt>
110    /// CODEBUILD
111    /// </dt>
112    /// <dd>
113    /// <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p>
114    /// </dd>
115    /// <dt>
116    /// SERVICE_ROLE
117    /// </dt>
118    /// <dd>
119    /// <p>Specifies that CodeBuild uses your build project's service role.</p>
120    /// </dd>
121    /// </dl>
122    /// <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials.</p>
123    pub image_pull_credentials_type_override: ::std::option::Option<crate::types::ImagePullCredentialsType>,
124    /// <p>Specifies if session debugging is enabled for this build. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html">Viewing a running build in Session Manager</a>.</p>
125    pub debug_session_enabled: ::std::option::Option<bool>,
126    /// <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
127    pub fleet_override: ::std::option::Option<crate::types::ProjectFleet>,
128    /// <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>
129    pub auto_retry_limit_override: ::std::option::Option<i32>,
130}
131impl StartBuildInput {
132    /// <p>The name of the CodeBuild build project to start running a build.</p>
133    pub fn project_name(&self) -> ::std::option::Option<&str> {
134        self.project_name.as_deref()
135    }
136    /// <p>An array of <code>ProjectSource</code> objects.</p>
137    ///
138    /// 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_override.is_none()`.
139    pub fn secondary_sources_override(&self) -> &[crate::types::ProjectSource] {
140        self.secondary_sources_override.as_deref().unwrap_or_default()
141    }
142    /// <p>An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only.</p>
143    ///
144    /// 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_version_override.is_none()`.
145    pub fn secondary_sources_version_override(&self) -> &[crate::types::ProjectSourceVersion] {
146        self.secondary_sources_version_override.as_deref().unwrap_or_default()
147    }
148    /// <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p>
149    /// <dl>
150    /// <dt>
151    /// CodeCommit
152    /// </dt>
153    /// <dd>
154    /// <p>The commit ID, branch, or Git tag to use.</p>
155    /// </dd>
156    /// <dt>
157    /// GitHub
158    /// </dt>
159    /// <dd>
160    /// <p>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>
161    /// </dd>
162    /// <dt>
163    /// GitLab
164    /// </dt>
165    /// <dd>
166    /// <p>The commit ID, branch, or Git tag to use.</p>
167    /// </dd>
168    /// <dt>
169    /// Bitbucket
170    /// </dt>
171    /// <dd>
172    /// <p>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>
173    /// </dd>
174    /// <dt>
175    /// Amazon S3
176    /// </dt>
177    /// <dd>
178    /// <p>The version ID of the object that represents the build input ZIP file to use.</p>
179    /// </dd>
180    /// </dl>
181    /// <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence.</p>
182    /// <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>
183    pub fn source_version(&self) -> ::std::option::Option<&str> {
184        self.source_version.as_deref()
185    }
186    /// <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
187    pub fn artifacts_override(&self) -> ::std::option::Option<&crate::types::ProjectArtifacts> {
188        self.artifacts_override.as_ref()
189    }
190    /// <p>An array of <code>ProjectArtifacts</code> objects.</p>
191    ///
192    /// 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_override.is_none()`.
193    pub fn secondary_artifacts_override(&self) -> &[crate::types::ProjectArtifacts] {
194        self.secondary_artifacts_override.as_deref().unwrap_or_default()
195    }
196    /// <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
197    ///
198    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.environment_variables_override.is_none()`.
199    pub fn environment_variables_override(&self) -> &[crate::types::EnvironmentVariable] {
200        self.environment_variables_override.as_deref().unwrap_or_default()
201    }
202    /// <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
203    pub fn source_type_override(&self) -> ::std::option::Option<&crate::types::SourceType> {
204        self.source_type_override.as_ref()
205    }
206    /// <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
207    pub fn source_location_override(&self) -> ::std::option::Option<&str> {
208        self.source_location_override.as_deref()
209    }
210    /// <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
211    pub fn source_auth_override(&self) -> ::std::option::Option<&crate::types::SourceAuth> {
212        self.source_auth_override.as_ref()
213    }
214    /// <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
215    pub fn git_clone_depth_override(&self) -> ::std::option::Option<i32> {
216        self.git_clone_depth_override
217    }
218    /// <p>Information about the Git submodules configuration for this build of an CodeBuild build project.</p>
219    pub fn git_submodules_config_override(&self) -> ::std::option::Option<&crate::types::GitSubmodulesConfig> {
220        self.git_submodules_config_override.as_ref()
221    }
222    /// <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p>
223    /// <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage">Buildspec File Name and Storage Location</a>.</p><note>
224    /// <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p>
225    /// </note>
226    pub fn buildspec_override(&self) -> ::std::option::Option<&str> {
227        self.buildspec_override.as_deref()
228    }
229    /// <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
230    pub fn insecure_ssl_override(&self) -> ::std::option::Option<bool> {
231        self.insecure_ssl_override
232    }
233    /// <p>Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown.</p>
234    /// <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p><note>
235    /// <p>The status of a build triggered by a webhook is always reported to your source provider.</p>
236    /// </note>
237    pub fn report_build_status_override(&self) -> ::std::option::Option<bool> {
238        self.report_build_status_override
239    }
240    /// <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
241    pub fn build_status_config_override(&self) -> ::std::option::Option<&crate::types::BuildStatusConfig> {
242        self.build_status_config_override.as_ref()
243    }
244    /// <p>A container type for this build that overrides the one specified in the build project.</p>
245    pub fn environment_type_override(&self) -> ::std::option::Option<&crate::types::EnvironmentType> {
246        self.environment_type_override.as_ref()
247    }
248    /// <p>The name of an image for this build that overrides the one specified in the build project.</p>
249    pub fn image_override(&self) -> ::std::option::Option<&str> {
250        self.image_override.as_deref()
251    }
252    /// <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
253    pub fn compute_type_override(&self) -> ::std::option::Option<&crate::types::ComputeType> {
254        self.compute_type_override.as_ref()
255    }
256    /// <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
257    pub fn certificate_override(&self) -> ::std::option::Option<&str> {
258        self.certificate_override.as_deref()
259    }
260    /// <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
261    pub fn cache_override(&self) -> ::std::option::Option<&crate::types::ProjectCache> {
262        self.cache_override.as_ref()
263    }
264    /// <p>The name of a service role for this build that overrides the one specified in the build project.</p>
265    pub fn service_role_override(&self) -> ::std::option::Option<&str> {
266        self.service_role_override.as_deref()
267    }
268    /// <p>Enable this flag to override privileged mode in the build project.</p>
269    pub fn privileged_mode_override(&self) -> ::std::option::Option<bool> {
270        self.privileged_mode_override
271    }
272    /// <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
273    pub fn timeout_in_minutes_override(&self) -> ::std::option::Option<i32> {
274        self.timeout_in_minutes_override
275    }
276    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
277    pub fn queued_timeout_in_minutes_override(&self) -> ::std::option::Option<i32> {
278        self.queued_timeout_in_minutes_override
279    }
280    /// <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p><note>
281    /// <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>
282    /// </note>
283    /// <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>
284    pub fn encryption_key_override(&self) -> ::std::option::Option<&str> {
285        self.encryption_key_override.as_deref()
286    }
287    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
288    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
289        self.idempotency_token.as_deref()
290    }
291    /// <p>Log settings for this build that override the log settings defined in the build project.</p>
292    pub fn logs_config_override(&self) -> ::std::option::Option<&crate::types::LogsConfig> {
293        self.logs_config_override.as_ref()
294    }
295    /// <p>The credentials for access to a private registry.</p>
296    pub fn registry_credential_override(&self) -> ::std::option::Option<&crate::types::RegistryCredential> {
297        self.registry_credential_override.as_ref()
298    }
299    /// <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values:</p>
300    /// <dl>
301    /// <dt>
302    /// CODEBUILD
303    /// </dt>
304    /// <dd>
305    /// <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p>
306    /// </dd>
307    /// <dt>
308    /// SERVICE_ROLE
309    /// </dt>
310    /// <dd>
311    /// <p>Specifies that CodeBuild uses your build project's service role.</p>
312    /// </dd>
313    /// </dl>
314    /// <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials.</p>
315    pub fn image_pull_credentials_type_override(&self) -> ::std::option::Option<&crate::types::ImagePullCredentialsType> {
316        self.image_pull_credentials_type_override.as_ref()
317    }
318    /// <p>Specifies if session debugging is enabled for this build. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html">Viewing a running build in Session Manager</a>.</p>
319    pub fn debug_session_enabled(&self) -> ::std::option::Option<bool> {
320        self.debug_session_enabled
321    }
322    /// <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
323    pub fn fleet_override(&self) -> ::std::option::Option<&crate::types::ProjectFleet> {
324        self.fleet_override.as_ref()
325    }
326    /// <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>
327    pub fn auto_retry_limit_override(&self) -> ::std::option::Option<i32> {
328        self.auto_retry_limit_override
329    }
330}
331impl StartBuildInput {
332    /// Creates a new builder-style object to manufacture [`StartBuildInput`](crate::operation::start_build::StartBuildInput).
333    pub fn builder() -> crate::operation::start_build::builders::StartBuildInputBuilder {
334        crate::operation::start_build::builders::StartBuildInputBuilder::default()
335    }
336}
337
338/// A builder for [`StartBuildInput`](crate::operation::start_build::StartBuildInput).
339#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
340#[non_exhaustive]
341pub struct StartBuildInputBuilder {
342    pub(crate) project_name: ::std::option::Option<::std::string::String>,
343    pub(crate) secondary_sources_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>,
344    pub(crate) secondary_sources_version_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>,
345    pub(crate) source_version: ::std::option::Option<::std::string::String>,
346    pub(crate) artifacts_override: ::std::option::Option<crate::types::ProjectArtifacts>,
347    pub(crate) secondary_artifacts_override: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>,
348    pub(crate) environment_variables_override: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>>,
349    pub(crate) source_type_override: ::std::option::Option<crate::types::SourceType>,
350    pub(crate) source_location_override: ::std::option::Option<::std::string::String>,
351    pub(crate) source_auth_override: ::std::option::Option<crate::types::SourceAuth>,
352    pub(crate) git_clone_depth_override: ::std::option::Option<i32>,
353    pub(crate) git_submodules_config_override: ::std::option::Option<crate::types::GitSubmodulesConfig>,
354    pub(crate) buildspec_override: ::std::option::Option<::std::string::String>,
355    pub(crate) insecure_ssl_override: ::std::option::Option<bool>,
356    pub(crate) report_build_status_override: ::std::option::Option<bool>,
357    pub(crate) build_status_config_override: ::std::option::Option<crate::types::BuildStatusConfig>,
358    pub(crate) environment_type_override: ::std::option::Option<crate::types::EnvironmentType>,
359    pub(crate) image_override: ::std::option::Option<::std::string::String>,
360    pub(crate) compute_type_override: ::std::option::Option<crate::types::ComputeType>,
361    pub(crate) certificate_override: ::std::option::Option<::std::string::String>,
362    pub(crate) cache_override: ::std::option::Option<crate::types::ProjectCache>,
363    pub(crate) service_role_override: ::std::option::Option<::std::string::String>,
364    pub(crate) privileged_mode_override: ::std::option::Option<bool>,
365    pub(crate) timeout_in_minutes_override: ::std::option::Option<i32>,
366    pub(crate) queued_timeout_in_minutes_override: ::std::option::Option<i32>,
367    pub(crate) encryption_key_override: ::std::option::Option<::std::string::String>,
368    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
369    pub(crate) logs_config_override: ::std::option::Option<crate::types::LogsConfig>,
370    pub(crate) registry_credential_override: ::std::option::Option<crate::types::RegistryCredential>,
371    pub(crate) image_pull_credentials_type_override: ::std::option::Option<crate::types::ImagePullCredentialsType>,
372    pub(crate) debug_session_enabled: ::std::option::Option<bool>,
373    pub(crate) fleet_override: ::std::option::Option<crate::types::ProjectFleet>,
374    pub(crate) auto_retry_limit_override: ::std::option::Option<i32>,
375}
376impl StartBuildInputBuilder {
377    /// <p>The name of the CodeBuild build project to start running a build.</p>
378    /// This field is required.
379    pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
380        self.project_name = ::std::option::Option::Some(input.into());
381        self
382    }
383    /// <p>The name of the CodeBuild build project to start running a build.</p>
384    pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
385        self.project_name = input;
386        self
387    }
388    /// <p>The name of the CodeBuild build project to start running a build.</p>
389    pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
390        &self.project_name
391    }
392    /// Appends an item to `secondary_sources_override`.
393    ///
394    /// To override the contents of this collection use [`set_secondary_sources_override`](Self::set_secondary_sources_override).
395    ///
396    /// <p>An array of <code>ProjectSource</code> objects.</p>
397    pub fn secondary_sources_override(mut self, input: crate::types::ProjectSource) -> Self {
398        let mut v = self.secondary_sources_override.unwrap_or_default();
399        v.push(input);
400        self.secondary_sources_override = ::std::option::Option::Some(v);
401        self
402    }
403    /// <p>An array of <code>ProjectSource</code> objects.</p>
404    pub fn set_secondary_sources_override(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>>) -> Self {
405        self.secondary_sources_override = input;
406        self
407    }
408    /// <p>An array of <code>ProjectSource</code> objects.</p>
409    pub fn get_secondary_sources_override(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectSource>> {
410        &self.secondary_sources_override
411    }
412    /// Appends an item to `secondary_sources_version_override`.
413    ///
414    /// To override the contents of this collection use [`set_secondary_sources_version_override`](Self::set_secondary_sources_version_override).
415    ///
416    /// <p>An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only.</p>
417    pub fn secondary_sources_version_override(mut self, input: crate::types::ProjectSourceVersion) -> Self {
418        let mut v = self.secondary_sources_version_override.unwrap_or_default();
419        v.push(input);
420        self.secondary_sources_version_override = ::std::option::Option::Some(v);
421        self
422    }
423    /// <p>An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only.</p>
424    pub fn set_secondary_sources_version_override(
425        mut self,
426        input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>>,
427    ) -> Self {
428        self.secondary_sources_version_override = input;
429        self
430    }
431    /// <p>An array of <code>ProjectSourceVersion</code> objects that specify one or more versions of the project's secondary sources to be used for this build only.</p>
432    pub fn get_secondary_sources_version_override(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectSourceVersion>> {
433        &self.secondary_sources_version_override
434    }
435    /// <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p>
436    /// <dl>
437    /// <dt>
438    /// CodeCommit
439    /// </dt>
440    /// <dd>
441    /// <p>The commit ID, branch, or Git tag to use.</p>
442    /// </dd>
443    /// <dt>
444    /// GitHub
445    /// </dt>
446    /// <dd>
447    /// <p>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>
448    /// </dd>
449    /// <dt>
450    /// GitLab
451    /// </dt>
452    /// <dd>
453    /// <p>The commit ID, branch, or Git tag to use.</p>
454    /// </dd>
455    /// <dt>
456    /// Bitbucket
457    /// </dt>
458    /// <dd>
459    /// <p>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>
460    /// </dd>
461    /// <dt>
462    /// Amazon S3
463    /// </dt>
464    /// <dd>
465    /// <p>The version ID of the object that represents the build input ZIP file to use.</p>
466    /// </dd>
467    /// </dl>
468    /// <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence.</p>
469    /// <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>
470    pub fn source_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471        self.source_version = ::std::option::Option::Some(input.into());
472        self
473    }
474    /// <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p>
475    /// <dl>
476    /// <dt>
477    /// CodeCommit
478    /// </dt>
479    /// <dd>
480    /// <p>The commit ID, branch, or Git tag to use.</p>
481    /// </dd>
482    /// <dt>
483    /// GitHub
484    /// </dt>
485    /// <dd>
486    /// <p>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>
487    /// </dd>
488    /// <dt>
489    /// GitLab
490    /// </dt>
491    /// <dd>
492    /// <p>The commit ID, branch, or Git tag to use.</p>
493    /// </dd>
494    /// <dt>
495    /// Bitbucket
496    /// </dt>
497    /// <dd>
498    /// <p>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>
499    /// </dd>
500    /// <dt>
501    /// Amazon S3
502    /// </dt>
503    /// <dd>
504    /// <p>The version ID of the object that represents the build input ZIP file to use.</p>
505    /// </dd>
506    /// </dl>
507    /// <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence.</p>
508    /// <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>
509    pub fn set_source_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
510        self.source_version = input;
511        self
512    }
513    /// <p>The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p>
514    /// <dl>
515    /// <dt>
516    /// CodeCommit
517    /// </dt>
518    /// <dd>
519    /// <p>The commit ID, branch, or Git tag to use.</p>
520    /// </dd>
521    /// <dt>
522    /// GitHub
523    /// </dt>
524    /// <dd>
525    /// <p>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>
526    /// </dd>
527    /// <dt>
528    /// GitLab
529    /// </dt>
530    /// <dd>
531    /// <p>The commit ID, branch, or Git tag to use.</p>
532    /// </dd>
533    /// <dt>
534    /// Bitbucket
535    /// </dt>
536    /// <dd>
537    /// <p>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>
538    /// </dd>
539    /// <dt>
540    /// Amazon S3
541    /// </dt>
542    /// <dd>
543    /// <p>The version ID of the object that represents the build input ZIP file to use.</p>
544    /// </dd>
545    /// </dl>
546    /// <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence.</p>
547    /// <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>
548    pub fn get_source_version(&self) -> &::std::option::Option<::std::string::String> {
549        &self.source_version
550    }
551    /// <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
552    pub fn artifacts_override(mut self, input: crate::types::ProjectArtifacts) -> Self {
553        self.artifacts_override = ::std::option::Option::Some(input);
554        self
555    }
556    /// <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
557    pub fn set_artifacts_override(mut self, input: ::std::option::Option<crate::types::ProjectArtifacts>) -> Self {
558        self.artifacts_override = input;
559        self
560    }
561    /// <p>Build output artifact settings that override, for this build only, the latest ones already defined in the build project.</p>
562    pub fn get_artifacts_override(&self) -> &::std::option::Option<crate::types::ProjectArtifacts> {
563        &self.artifacts_override
564    }
565    /// Appends an item to `secondary_artifacts_override`.
566    ///
567    /// To override the contents of this collection use [`set_secondary_artifacts_override`](Self::set_secondary_artifacts_override).
568    ///
569    /// <p>An array of <code>ProjectArtifacts</code> objects.</p>
570    pub fn secondary_artifacts_override(mut self, input: crate::types::ProjectArtifacts) -> Self {
571        let mut v = self.secondary_artifacts_override.unwrap_or_default();
572        v.push(input);
573        self.secondary_artifacts_override = ::std::option::Option::Some(v);
574        self
575    }
576    /// <p>An array of <code>ProjectArtifacts</code> objects.</p>
577    pub fn set_secondary_artifacts_override(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>>) -> Self {
578        self.secondary_artifacts_override = input;
579        self
580    }
581    /// <p>An array of <code>ProjectArtifacts</code> objects.</p>
582    pub fn get_secondary_artifacts_override(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectArtifacts>> {
583        &self.secondary_artifacts_override
584    }
585    /// Appends an item to `environment_variables_override`.
586    ///
587    /// To override the contents of this collection use [`set_environment_variables_override`](Self::set_environment_variables_override).
588    ///
589    /// <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
590    pub fn environment_variables_override(mut self, input: crate::types::EnvironmentVariable) -> Self {
591        let mut v = self.environment_variables_override.unwrap_or_default();
592        v.push(input);
593        self.environment_variables_override = ::std::option::Option::Some(v);
594        self
595    }
596    /// <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
597    pub fn set_environment_variables_override(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>>) -> Self {
598        self.environment_variables_override = input;
599        self
600    }
601    /// <p>A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.</p>
602    pub fn get_environment_variables_override(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>> {
603        &self.environment_variables_override
604    }
605    /// <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
606    pub fn source_type_override(mut self, input: crate::types::SourceType) -> Self {
607        self.source_type_override = ::std::option::Option::Some(input);
608        self
609    }
610    /// <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
611    pub fn set_source_type_override(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
612        self.source_type_override = input;
613        self
614    }
615    /// <p>A source input type, for this build, that overrides the source input defined in the build project.</p>
616    pub fn get_source_type_override(&self) -> &::std::option::Option<crate::types::SourceType> {
617        &self.source_type_override
618    }
619    /// <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
620    pub fn source_location_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
621        self.source_location_override = ::std::option::Option::Some(input.into());
622        self
623    }
624    /// <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
625    pub fn set_source_location_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
626        self.source_location_override = input;
627        self
628    }
629    /// <p>A location that overrides, for this build, the source location for the one defined in the build project.</p>
630    pub fn get_source_location_override(&self) -> &::std::option::Option<::std::string::String> {
631        &self.source_location_override
632    }
633    /// <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
634    pub fn source_auth_override(mut self, input: crate::types::SourceAuth) -> Self {
635        self.source_auth_override = ::std::option::Option::Some(input);
636        self
637    }
638    /// <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
639    pub fn set_source_auth_override(mut self, input: ::std::option::Option<crate::types::SourceAuth>) -> Self {
640        self.source_auth_override = input;
641        self
642    }
643    /// <p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>
644    pub fn get_source_auth_override(&self) -> &::std::option::Option<crate::types::SourceAuth> {
645        &self.source_auth_override
646    }
647    /// <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
648    pub fn git_clone_depth_override(mut self, input: i32) -> Self {
649        self.git_clone_depth_override = ::std::option::Option::Some(input);
650        self
651    }
652    /// <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
653    pub fn set_git_clone_depth_override(mut self, input: ::std::option::Option<i32>) -> Self {
654        self.git_clone_depth_override = input;
655        self
656    }
657    /// <p>The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.</p>
658    pub fn get_git_clone_depth_override(&self) -> &::std::option::Option<i32> {
659        &self.git_clone_depth_override
660    }
661    /// <p>Information about the Git submodules configuration for this build of an CodeBuild build project.</p>
662    pub fn git_submodules_config_override(mut self, input: crate::types::GitSubmodulesConfig) -> Self {
663        self.git_submodules_config_override = ::std::option::Option::Some(input);
664        self
665    }
666    /// <p>Information about the Git submodules configuration for this build of an CodeBuild build project.</p>
667    pub fn set_git_submodules_config_override(mut self, input: ::std::option::Option<crate::types::GitSubmodulesConfig>) -> Self {
668        self.git_submodules_config_override = input;
669        self
670    }
671    /// <p>Information about the Git submodules configuration for this build of an CodeBuild build project.</p>
672    pub fn get_git_submodules_config_override(&self) -> &::std::option::Option<crate::types::GitSubmodulesConfig> {
673        &self.git_submodules_config_override
674    }
675    /// <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p>
676    /// <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage">Buildspec File Name and Storage Location</a>.</p><note>
677    /// <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p>
678    /// </note>
679    pub fn buildspec_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
680        self.buildspec_override = ::std::option::Option::Some(input.into());
681        self
682    }
683    /// <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p>
684    /// <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage">Buildspec File Name and Storage Location</a>.</p><note>
685    /// <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p>
686    /// </note>
687    pub fn set_buildspec_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
688        self.buildspec_override = input;
689        self
690    }
691    /// <p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p>
692    /// <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage">Buildspec File Name and Storage Location</a>.</p><note>
693    /// <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p>
694    /// </note>
695    pub fn get_buildspec_override(&self) -> &::std::option::Option<::std::string::String> {
696        &self.buildspec_override
697    }
698    /// <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
699    pub fn insecure_ssl_override(mut self, input: bool) -> Self {
700        self.insecure_ssl_override = ::std::option::Option::Some(input);
701        self
702    }
703    /// <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
704    pub fn set_insecure_ssl_override(mut self, input: ::std::option::Option<bool>) -> Self {
705        self.insecure_ssl_override = input;
706        self
707    }
708    /// <p>Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.</p>
709    pub fn get_insecure_ssl_override(&self) -> &::std::option::Option<bool> {
710        &self.insecure_ssl_override
711    }
712    /// <p>Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown.</p>
713    /// <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p><note>
714    /// <p>The status of a build triggered by a webhook is always reported to your source provider.</p>
715    /// </note>
716    pub fn report_build_status_override(mut self, input: bool) -> Self {
717        self.report_build_status_override = ::std::option::Option::Some(input);
718        self
719    }
720    /// <p>Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown.</p>
721    /// <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p><note>
722    /// <p>The status of a build triggered by a webhook is always reported to your source provider.</p>
723    /// </note>
724    pub fn set_report_build_status_override(mut self, input: ::std::option::Option<bool>) -> Self {
725        self.report_build_status_override = input;
726        self
727    }
728    /// <p>Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an <code>invalidInputException</code> is thrown.</p>
729    /// <p>To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html">Source provider access</a> in the <i>CodeBuild User Guide</i>.</p><note>
730    /// <p>The status of a build triggered by a webhook is always reported to your source provider.</p>
731    /// </note>
732    pub fn get_report_build_status_override(&self) -> &::std::option::Option<bool> {
733        &self.report_build_status_override
734    }
735    /// <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
736    pub fn build_status_config_override(mut self, input: crate::types::BuildStatusConfig) -> Self {
737        self.build_status_config_override = ::std::option::Option::Some(input);
738        self
739    }
740    /// <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
741    pub fn set_build_status_config_override(mut self, input: ::std::option::Option<crate::types::BuildStatusConfig>) -> Self {
742        self.build_status_config_override = input;
743        self
744    }
745    /// <p>Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is <code>GITHUB</code>, <code>GITHUB_ENTERPRISE</code>, or <code>BITBUCKET</code>.</p>
746    pub fn get_build_status_config_override(&self) -> &::std::option::Option<crate::types::BuildStatusConfig> {
747        &self.build_status_config_override
748    }
749    /// <p>A container type for this build that overrides the one specified in the build project.</p>
750    pub fn environment_type_override(mut self, input: crate::types::EnvironmentType) -> Self {
751        self.environment_type_override = ::std::option::Option::Some(input);
752        self
753    }
754    /// <p>A container type for this build that overrides the one specified in the build project.</p>
755    pub fn set_environment_type_override(mut self, input: ::std::option::Option<crate::types::EnvironmentType>) -> Self {
756        self.environment_type_override = input;
757        self
758    }
759    /// <p>A container type for this build that overrides the one specified in the build project.</p>
760    pub fn get_environment_type_override(&self) -> &::std::option::Option<crate::types::EnvironmentType> {
761        &self.environment_type_override
762    }
763    /// <p>The name of an image for this build that overrides the one specified in the build project.</p>
764    pub fn image_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
765        self.image_override = ::std::option::Option::Some(input.into());
766        self
767    }
768    /// <p>The name of an image for this build that overrides the one specified in the build project.</p>
769    pub fn set_image_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
770        self.image_override = input;
771        self
772    }
773    /// <p>The name of an image for this build that overrides the one specified in the build project.</p>
774    pub fn get_image_override(&self) -> &::std::option::Option<::std::string::String> {
775        &self.image_override
776    }
777    /// <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
778    pub fn compute_type_override(mut self, input: crate::types::ComputeType) -> Self {
779        self.compute_type_override = ::std::option::Option::Some(input);
780        self
781    }
782    /// <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
783    pub fn set_compute_type_override(mut self, input: ::std::option::Option<crate::types::ComputeType>) -> Self {
784        self.compute_type_override = input;
785        self
786    }
787    /// <p>The name of a compute type for this build that overrides the one specified in the build project.</p>
788    pub fn get_compute_type_override(&self) -> &::std::option::Option<crate::types::ComputeType> {
789        &self.compute_type_override
790    }
791    /// <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
792    pub fn certificate_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
793        self.certificate_override = ::std::option::Option::Some(input.into());
794        self
795    }
796    /// <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
797    pub fn set_certificate_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
798        self.certificate_override = input;
799        self
800    }
801    /// <p>The name of a certificate for this build that overrides the one specified in the build project.</p>
802    pub fn get_certificate_override(&self) -> &::std::option::Option<::std::string::String> {
803        &self.certificate_override
804    }
805    /// <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
806    pub fn cache_override(mut self, input: crate::types::ProjectCache) -> Self {
807        self.cache_override = ::std::option::Option::Some(input);
808        self
809    }
810    /// <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
811    pub fn set_cache_override(mut self, input: ::std::option::Option<crate::types::ProjectCache>) -> Self {
812        self.cache_override = input;
813        self
814    }
815    /// <p>A ProjectCache object specified for this build that overrides the one defined in the build project.</p>
816    pub fn get_cache_override(&self) -> &::std::option::Option<crate::types::ProjectCache> {
817        &self.cache_override
818    }
819    /// <p>The name of a service role for this build that overrides the one specified in the build project.</p>
820    pub fn service_role_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
821        self.service_role_override = ::std::option::Option::Some(input.into());
822        self
823    }
824    /// <p>The name of a service role for this build that overrides the one specified in the build project.</p>
825    pub fn set_service_role_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
826        self.service_role_override = input;
827        self
828    }
829    /// <p>The name of a service role for this build that overrides the one specified in the build project.</p>
830    pub fn get_service_role_override(&self) -> &::std::option::Option<::std::string::String> {
831        &self.service_role_override
832    }
833    /// <p>Enable this flag to override privileged mode in the build project.</p>
834    pub fn privileged_mode_override(mut self, input: bool) -> Self {
835        self.privileged_mode_override = ::std::option::Option::Some(input);
836        self
837    }
838    /// <p>Enable this flag to override privileged mode in the build project.</p>
839    pub fn set_privileged_mode_override(mut self, input: ::std::option::Option<bool>) -> Self {
840        self.privileged_mode_override = input;
841        self
842    }
843    /// <p>Enable this flag to override privileged mode in the build project.</p>
844    pub fn get_privileged_mode_override(&self) -> &::std::option::Option<bool> {
845        &self.privileged_mode_override
846    }
847    /// <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
848    pub fn timeout_in_minutes_override(mut self, input: i32) -> Self {
849        self.timeout_in_minutes_override = ::std::option::Option::Some(input);
850        self
851    }
852    /// <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
853    pub fn set_timeout_in_minutes_override(mut self, input: ::std::option::Option<i32>) -> Self {
854        self.timeout_in_minutes_override = input;
855        self
856    }
857    /// <p>The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.</p>
858    pub fn get_timeout_in_minutes_override(&self) -> &::std::option::Option<i32> {
859        &self.timeout_in_minutes_override
860    }
861    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
862    pub fn queued_timeout_in_minutes_override(mut self, input: i32) -> Self {
863        self.queued_timeout_in_minutes_override = ::std::option::Option::Some(input);
864        self
865    }
866    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
867    pub fn set_queued_timeout_in_minutes_override(mut self, input: ::std::option::Option<i32>) -> Self {
868        self.queued_timeout_in_minutes_override = input;
869        self
870    }
871    /// <p>The number of minutes a build is allowed to be queued before it times out.</p>
872    pub fn get_queued_timeout_in_minutes_override(&self) -> &::std::option::Option<i32> {
873        &self.queued_timeout_in_minutes_override
874    }
875    /// <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p><note>
876    /// <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>
877    /// </note>
878    /// <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>
879    pub fn encryption_key_override(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
880        self.encryption_key_override = ::std::option::Option::Some(input.into());
881        self
882    }
883    /// <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p><note>
884    /// <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>
885    /// </note>
886    /// <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>
887    pub fn set_encryption_key_override(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
888        self.encryption_key_override = input;
889        self
890    }
891    /// <p>The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.</p><note>
892    /// <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>
893    /// </note>
894    /// <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>
895    pub fn get_encryption_key_override(&self) -> &::std::option::Option<::std::string::String> {
896        &self.encryption_key_override
897    }
898    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
899    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
900        self.idempotency_token = ::std::option::Option::Some(input.into());
901        self
902    }
903    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
904    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
905        self.idempotency_token = input;
906        self
907    }
908    /// <p>A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
909    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
910        &self.idempotency_token
911    }
912    /// <p>Log settings for this build that override the log settings defined in the build project.</p>
913    pub fn logs_config_override(mut self, input: crate::types::LogsConfig) -> Self {
914        self.logs_config_override = ::std::option::Option::Some(input);
915        self
916    }
917    /// <p>Log settings for this build that override the log settings defined in the build project.</p>
918    pub fn set_logs_config_override(mut self, input: ::std::option::Option<crate::types::LogsConfig>) -> Self {
919        self.logs_config_override = input;
920        self
921    }
922    /// <p>Log settings for this build that override the log settings defined in the build project.</p>
923    pub fn get_logs_config_override(&self) -> &::std::option::Option<crate::types::LogsConfig> {
924        &self.logs_config_override
925    }
926    /// <p>The credentials for access to a private registry.</p>
927    pub fn registry_credential_override(mut self, input: crate::types::RegistryCredential) -> Self {
928        self.registry_credential_override = ::std::option::Option::Some(input);
929        self
930    }
931    /// <p>The credentials for access to a private registry.</p>
932    pub fn set_registry_credential_override(mut self, input: ::std::option::Option<crate::types::RegistryCredential>) -> Self {
933        self.registry_credential_override = input;
934        self
935    }
936    /// <p>The credentials for access to a private registry.</p>
937    pub fn get_registry_credential_override(&self) -> &::std::option::Option<crate::types::RegistryCredential> {
938        &self.registry_credential_override
939    }
940    /// <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values:</p>
941    /// <dl>
942    /// <dt>
943    /// CODEBUILD
944    /// </dt>
945    /// <dd>
946    /// <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p>
947    /// </dd>
948    /// <dt>
949    /// SERVICE_ROLE
950    /// </dt>
951    /// <dd>
952    /// <p>Specifies that CodeBuild uses your build project's service role.</p>
953    /// </dd>
954    /// </dl>
955    /// <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials.</p>
956    pub fn image_pull_credentials_type_override(mut self, input: crate::types::ImagePullCredentialsType) -> Self {
957        self.image_pull_credentials_type_override = ::std::option::Option::Some(input);
958        self
959    }
960    /// <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values:</p>
961    /// <dl>
962    /// <dt>
963    /// CODEBUILD
964    /// </dt>
965    /// <dd>
966    /// <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p>
967    /// </dd>
968    /// <dt>
969    /// SERVICE_ROLE
970    /// </dt>
971    /// <dd>
972    /// <p>Specifies that CodeBuild uses your build project's service role.</p>
973    /// </dd>
974    /// </dl>
975    /// <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials.</p>
976    pub fn set_image_pull_credentials_type_override(mut self, input: ::std::option::Option<crate::types::ImagePullCredentialsType>) -> Self {
977        self.image_pull_credentials_type_override = input;
978        self
979    }
980    /// <p>The type of credentials CodeBuild uses to pull images in your build. There are two valid values:</p>
981    /// <dl>
982    /// <dt>
983    /// CODEBUILD
984    /// </dt>
985    /// <dd>
986    /// <p>Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.</p>
987    /// </dd>
988    /// <dt>
989    /// SERVICE_ROLE
990    /// </dt>
991    /// <dd>
992    /// <p>Specifies that CodeBuild uses your build project's service role.</p>
993    /// </dd>
994    /// </dl>
995    /// <p>When using a cross-account or private registry image, you must use <code>SERVICE_ROLE</code> credentials. When using an CodeBuild curated image, you must use <code>CODEBUILD</code> credentials.</p>
996    pub fn get_image_pull_credentials_type_override(&self) -> &::std::option::Option<crate::types::ImagePullCredentialsType> {
997        &self.image_pull_credentials_type_override
998    }
999    /// <p>Specifies if session debugging is enabled for this build. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html">Viewing a running build in Session Manager</a>.</p>
1000    pub fn debug_session_enabled(mut self, input: bool) -> Self {
1001        self.debug_session_enabled = ::std::option::Option::Some(input);
1002        self
1003    }
1004    /// <p>Specifies if session debugging is enabled for this build. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html">Viewing a running build in Session Manager</a>.</p>
1005    pub fn set_debug_session_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1006        self.debug_session_enabled = input;
1007        self
1008    }
1009    /// <p>Specifies if session debugging is enabled for this build. For more information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html">Viewing a running build in Session Manager</a>.</p>
1010    pub fn get_debug_session_enabled(&self) -> &::std::option::Option<bool> {
1011        &self.debug_session_enabled
1012    }
1013    /// <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
1014    pub fn fleet_override(mut self, input: crate::types::ProjectFleet) -> Self {
1015        self.fleet_override = ::std::option::Option::Some(input);
1016        self
1017    }
1018    /// <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
1019    pub fn set_fleet_override(mut self, input: ::std::option::Option<crate::types::ProjectFleet>) -> Self {
1020        self.fleet_override = input;
1021        self
1022    }
1023    /// <p>A ProjectFleet object specified for this build that overrides the one defined in the build project.</p>
1024    pub fn get_fleet_override(&self) -> &::std::option::Option<crate::types::ProjectFleet> {
1025        &self.fleet_override
1026    }
1027    /// <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>
1028    pub fn auto_retry_limit_override(mut self, input: i32) -> Self {
1029        self.auto_retry_limit_override = ::std::option::Option::Some(input);
1030        self
1031    }
1032    /// <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>
1033    pub fn set_auto_retry_limit_override(mut self, input: ::std::option::Option<i32>) -> Self {
1034        self.auto_retry_limit_override = input;
1035        self
1036    }
1037    /// <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>
1038    pub fn get_auto_retry_limit_override(&self) -> &::std::option::Option<i32> {
1039        &self.auto_retry_limit_override
1040    }
1041    /// Consumes the builder and constructs a [`StartBuildInput`](crate::operation::start_build::StartBuildInput).
1042    pub fn build(self) -> ::std::result::Result<crate::operation::start_build::StartBuildInput, ::aws_smithy_types::error::operation::BuildError> {
1043        ::std::result::Result::Ok(crate::operation::start_build::StartBuildInput {
1044            project_name: self.project_name,
1045            secondary_sources_override: self.secondary_sources_override,
1046            secondary_sources_version_override: self.secondary_sources_version_override,
1047            source_version: self.source_version,
1048            artifacts_override: self.artifacts_override,
1049            secondary_artifacts_override: self.secondary_artifacts_override,
1050            environment_variables_override: self.environment_variables_override,
1051            source_type_override: self.source_type_override,
1052            source_location_override: self.source_location_override,
1053            source_auth_override: self.source_auth_override,
1054            git_clone_depth_override: self.git_clone_depth_override,
1055            git_submodules_config_override: self.git_submodules_config_override,
1056            buildspec_override: self.buildspec_override,
1057            insecure_ssl_override: self.insecure_ssl_override,
1058            report_build_status_override: self.report_build_status_override,
1059            build_status_config_override: self.build_status_config_override,
1060            environment_type_override: self.environment_type_override,
1061            image_override: self.image_override,
1062            compute_type_override: self.compute_type_override,
1063            certificate_override: self.certificate_override,
1064            cache_override: self.cache_override,
1065            service_role_override: self.service_role_override,
1066            privileged_mode_override: self.privileged_mode_override,
1067            timeout_in_minutes_override: self.timeout_in_minutes_override,
1068            queued_timeout_in_minutes_override: self.queued_timeout_in_minutes_override,
1069            encryption_key_override: self.encryption_key_override,
1070            idempotency_token: self.idempotency_token,
1071            logs_config_override: self.logs_config_override,
1072            registry_credential_override: self.registry_credential_override,
1073            image_pull_credentials_type_override: self.image_pull_credentials_type_override,
1074            debug_session_enabled: self.debug_session_enabled,
1075            fleet_override: self.fleet_override,
1076            auto_retry_limit_override: self.auto_retry_limit_override,
1077        })
1078    }
1079}