#[non_exhaustive]pub struct ProjectSourceVersionBuilder { /* private fields */ }
Expand description
A builder for ProjectSourceVersion
.
Implementations§
source§impl ProjectSourceVersionBuilder
impl ProjectSourceVersionBuilder
sourcepub fn source_identifier(self, input: impl Into<String>) -> Self
pub fn source_identifier(self, input: impl Into<String>) -> Self
An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
This field is required.sourcepub fn set_source_identifier(self, input: Option<String>) -> Self
pub fn set_source_identifier(self, input: Option<String>) -> Self
An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
sourcepub fn get_source_identifier(&self) -> &Option<String>
pub fn get_source_identifier(&self) -> &Option<String>
An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
sourcepub fn source_version(self, input: impl Into<String>) -> Self
pub fn source_version(self, input: impl Into<String>) -> Self
The source version for the corresponding source identifier. If specified, must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
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
pr/pull-request-ID
(for example,pr/25
). 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. -
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.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
This field is required.sourcepub fn set_source_version(self, input: Option<String>) -> Self
pub fn set_source_version(self, input: Option<String>) -> Self
The source version for the corresponding source identifier. If specified, must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
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
pr/pull-request-ID
(for example,pr/25
). 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. -
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.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
sourcepub fn get_source_version(&self) -> &Option<String>
pub fn get_source_version(&self) -> &Option<String>
The source version for the corresponding source identifier. If specified, must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
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
pr/pull-request-ID
(for example,pr/25
). 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. -
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.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
sourcepub fn build(self) -> Result<ProjectSourceVersion, BuildError>
pub fn build(self) -> Result<ProjectSourceVersion, BuildError>
Consumes the builder and constructs a ProjectSourceVersion
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ProjectSourceVersionBuilder
impl Clone for ProjectSourceVersionBuilder
source§fn clone(&self) -> ProjectSourceVersionBuilder
fn clone(&self) -> ProjectSourceVersionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProjectSourceVersionBuilder
impl Debug for ProjectSourceVersionBuilder
source§impl Default for ProjectSourceVersionBuilder
impl Default for ProjectSourceVersionBuilder
source§fn default() -> ProjectSourceVersionBuilder
fn default() -> ProjectSourceVersionBuilder
source§impl PartialEq for ProjectSourceVersionBuilder
impl PartialEq for ProjectSourceVersionBuilder
source§fn eq(&self, other: &ProjectSourceVersionBuilder) -> bool
fn eq(&self, other: &ProjectSourceVersionBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.