#[non_exhaustive]pub struct GitRepoSource {
pub uri: String,
pub ref: String,
pub repo_type: RepoType,
pub source: Option<Source>,
pub enterprise_config: Option<EnterpriseConfig>,
/* private fields */
}
Expand description
GitRepoSource describes a repo and ref of a 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.uri: String
The URI of the repo (e.g. https://github.com/user/repo.git).
Either uri
or repository
can be specified and is required.
ref: String
The branch or tag to use. Must start with “refs/” (required).
repo_type: RepoType
See RepoType below.
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 GitRepoSource
impl GitRepoSource
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_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 GitRepoSource
impl Clone for GitRepoSource
Source§fn clone(&self) -> GitRepoSource
fn clone(&self) -> GitRepoSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more