#[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: StringThe URI of the repo (e.g. https://github.com/user/repo.git).
Either uri or repository can be specified and is required.
ref: StringThe branch or tag to use. Must start with “refs/” (required).
repo_type: RepoTypeSee 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
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.
§Example
use google_cloud_build_v1::model::git_file_source::RepoType;
let x0 = GitRepoSource::new().set_repo_type(RepoType::CloudSourceRepositories);
let x1 = GitRepoSource::new().set_repo_type(RepoType::Github);
let x2 = GitRepoSource::new().set_repo_type(RepoType::BitbucketServer);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
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
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.
§Example
use google_cloud_build_v1::model::git_repo_source::EnterpriseConfig;
let x = GitRepoSource::new().set_enterprise_config(Some(EnterpriseConfig::GithubEnterpriseConfig("example".to_string())));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.
§Example
let x = GitRepoSource::new().set_github_enterprise_config(format!("projects/{project_id}/githubEnterpriseConfigs/{config_id}"));
assert!(x.github_enterprise_config().is_some());Trait Implementations§
Source§impl Clone for GitRepoSource
impl Clone for GitRepoSource
Source§fn clone(&self) -> GitRepoSource
fn clone(&self) -> GitRepoSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitRepoSource
impl Debug for GitRepoSource
Source§impl Default for GitRepoSource
impl Default for GitRepoSource
Source§fn default() -> GitRepoSource
fn default() -> GitRepoSource
Source§impl Message for GitRepoSource
impl Message for GitRepoSource
Source§impl PartialEq for GitRepoSource
impl PartialEq for GitRepoSource
impl StructuralPartialEq for GitRepoSource
Auto Trait Implementations§
impl Freeze for GitRepoSource
impl RefUnwindSafe for GitRepoSource
impl Send for GitRepoSource
impl Sync for GitRepoSource
impl Unpin for GitRepoSource
impl UnsafeUnpin for GitRepoSource
impl UnwindSafe for GitRepoSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request