#[non_exhaustive]pub struct GitFileSource {
pub path: String,
pub uri: String,
pub repo_type: RepoType,
pub revision: String,
pub source: Option<Source>,
pub enterprise_config: Option<EnterpriseConfig>,
/* private fields */
}
Expand description
GitFileSource describes a file within a (possibly remote) code 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.path: String
The path of the file, with the repo root as the root of the path.
uri: String
The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
repo_type: RepoType
See RepoType above.
revision: String
The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
source: Option<Source>
The source of the SCM repo.
enterprise_config: Option<EnterpriseConfig>
The resource name of the enterprise config that should be applied to this source.
Implementations§
Source§impl GitFileSource
impl GitFileSource
pub fn new() -> Self
Sourcepub fn set_repo_type<T: Into<RepoType>>(self, v: T) -> Self
pub fn set_repo_type<T: Into<RepoType>>(self, v: T) -> Self
Sets the value of repo_type.
Sourcepub fn set_revision<T: Into<String>>(self, v: T) -> Self
pub fn set_revision<T: Into<String>>(self, v: T) -> Self
Sets the value of revision.
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source
are mutually
exclusive.
Sourcepub fn repository(&self) -> Option<&String>
pub fn repository(&self) -> Option<&String>
The value of source
if it holds a Repository
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_repository<T: Into<String>>(self, v: T) -> Self
pub fn set_repository<T: Into<String>>(self, v: T) -> Self
Sets the value of source
to hold a Repository
.
Note that all the setters affecting source
are
mutually exclusive.
Sourcepub fn set_enterprise_config<T: Into<Option<EnterpriseConfig>>>(
self,
v: T,
) -> Self
pub fn set_enterprise_config<T: Into<Option<EnterpriseConfig>>>( self, v: T, ) -> Self
Sets the value of enterprise_config.
Note that all the setters affecting enterprise_config
are mutually
exclusive.
Sourcepub fn github_enterprise_config(&self) -> Option<&String>
pub fn github_enterprise_config(&self) -> Option<&String>
The value of enterprise_config
if it holds a GithubEnterpriseConfig
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_github_enterprise_config<T: Into<String>>(self, v: T) -> Self
pub fn set_github_enterprise_config<T: Into<String>>(self, v: T) -> Self
Sets the value of enterprise_config
to hold a GithubEnterpriseConfig
.
Note that all the setters affecting enterprise_config
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for GitFileSource
impl Clone for GitFileSource
Source§fn clone(&self) -> GitFileSource
fn clone(&self) -> GitFileSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more