#[non_exhaustive]pub struct RepoSource {
pub project_id: String,
pub repo_name: String,
pub dir: String,
pub invert_regex: bool,
pub revision: Option<Revision>,
/* private fields */
}
Expand description
Location of the source in a Google Cloud Source Repository.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.project_id: String
ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
repo_name: String
Name of the Cloud Source Repository.
dir: String
Directory, relative to the source root, in which to run the build.
This must be a relative path. If a step’s dir
is specified and is an
absolute path, this value is ignored for that step’s execution.
eg. helloworld (no leading slash allowed)
invert_regex: bool
Only trigger a build if the revision regex does NOT match the revision regex.
revision: Option<Revision>
A revision within the Cloud Source Repository must be specified in one of these ways.
Implementations§
Source§impl RepoSource
impl RepoSource
pub fn new() -> Self
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sets the value of project_id.
Sourcepub fn set_repo_name<T: Into<String>>(self, v: T) -> Self
pub fn set_repo_name<T: Into<String>>(self, v: T) -> Self
Sets the value of repo_name.
Sourcepub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
pub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
Sets the value of invert_regex.
Sourcepub fn set_revision<T: Into<Option<Revision>>>(self, v: T) -> Self
pub fn set_revision<T: Into<Option<Revision>>>(self, v: T) -> Self
Sets the value of revision.
Note that all the setters affecting revision
are mutually
exclusive.
Sourcepub fn branch_name(&self) -> Option<&String>
pub fn branch_name(&self) -> Option<&String>
The value of revision
if it holds a BranchName
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_branch_name<T: Into<String>>(self, v: T) -> Self
pub fn set_branch_name<T: Into<String>>(self, v: T) -> Self
Sets the value of revision
to hold a BranchName
.
Note that all the setters affecting revision
are
mutually exclusive.
Sourcepub fn tag_name(&self) -> Option<&String>
pub fn tag_name(&self) -> Option<&String>
The value of revision
if it holds a TagName
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_tag_name<T: Into<String>>(self, v: T) -> Self
pub fn set_tag_name<T: Into<String>>(self, v: T) -> Self
Sets the value of revision
to hold a TagName
.
Note that all the setters affecting revision
are
mutually exclusive.
Sourcepub fn commit_sha(&self) -> Option<&String>
pub fn commit_sha(&self) -> Option<&String>
The value of revision
if it holds a CommitSha
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_commit_sha<T: Into<String>>(self, v: T) -> Self
pub fn set_commit_sha<T: Into<String>>(self, v: T) -> Self
Sets the value of revision
to hold a CommitSha
.
Note that all the setters affecting revision
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for RepoSource
impl Clone for RepoSource
Source§fn clone(&self) -> RepoSource
fn clone(&self) -> RepoSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more