#[non_exhaustive]pub struct Source {
pub source: Option<Source>,
/* private fields */
}Expand description
Location of the source in a supported storage service.
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.source: Option<Source>Location of source.
Implementations§
Source§impl Source
impl Source
pub fn new() -> Self
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 storage_source(&self) -> Option<&Box<StorageSource>>
pub fn storage_source(&self) -> Option<&Box<StorageSource>>
The value of source
if it holds a StorageSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
pub fn set_storage_source<T: Into<Box<StorageSource>>>(self, v: T) -> Self
Sets the value of source
to hold a StorageSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_build_v1::model::StorageSource;
let x = Source::new().set_storage_source(StorageSource::default()/* use setters */);
assert!(x.storage_source().is_some());
assert!(x.repo_source().is_none());
assert!(x.git_source().is_none());
assert!(x.storage_source_manifest().is_none());
assert!(x.connected_repository().is_none());Sourcepub fn repo_source(&self) -> Option<&Box<RepoSource>>
pub fn repo_source(&self) -> Option<&Box<RepoSource>>
The value of source
if it holds a RepoSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_repo_source<T: Into<Box<RepoSource>>>(self, v: T) -> Self
pub fn set_repo_source<T: Into<Box<RepoSource>>>(self, v: T) -> Self
Sets the value of source
to hold a RepoSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_build_v1::model::RepoSource;
let x = Source::new().set_repo_source(RepoSource::default()/* use setters */);
assert!(x.repo_source().is_some());
assert!(x.storage_source().is_none());
assert!(x.git_source().is_none());
assert!(x.storage_source_manifest().is_none());
assert!(x.connected_repository().is_none());Sourcepub fn git_source(&self) -> Option<&Box<GitSource>>
pub fn git_source(&self) -> Option<&Box<GitSource>>
The value of source
if it holds a GitSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_git_source<T: Into<Box<GitSource>>>(self, v: T) -> Self
pub fn set_git_source<T: Into<Box<GitSource>>>(self, v: T) -> Self
Sets the value of source
to hold a GitSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_build_v1::model::GitSource;
let x = Source::new().set_git_source(GitSource::default()/* use setters */);
assert!(x.git_source().is_some());
assert!(x.storage_source().is_none());
assert!(x.repo_source().is_none());
assert!(x.storage_source_manifest().is_none());
assert!(x.connected_repository().is_none());Sourcepub fn storage_source_manifest(&self) -> Option<&Box<StorageSourceManifest>>
pub fn storage_source_manifest(&self) -> Option<&Box<StorageSourceManifest>>
The value of source
if it holds a StorageSourceManifest, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_source_manifest<T: Into<Box<StorageSourceManifest>>>(
self,
v: T,
) -> Self
pub fn set_storage_source_manifest<T: Into<Box<StorageSourceManifest>>>( self, v: T, ) -> Self
Sets the value of source
to hold a StorageSourceManifest.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_build_v1::model::StorageSourceManifest;
let x = Source::new().set_storage_source_manifest(StorageSourceManifest::default()/* use setters */);
assert!(x.storage_source_manifest().is_some());
assert!(x.storage_source().is_none());
assert!(x.repo_source().is_none());
assert!(x.git_source().is_none());
assert!(x.connected_repository().is_none());Sourcepub fn connected_repository(&self) -> Option<&Box<ConnectedRepository>>
pub fn connected_repository(&self) -> Option<&Box<ConnectedRepository>>
The value of source
if it holds a ConnectedRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_connected_repository<T: Into<Box<ConnectedRepository>>>(
self,
v: T,
) -> Self
pub fn set_connected_repository<T: Into<Box<ConnectedRepository>>>( self, v: T, ) -> Self
Sets the value of source
to hold a ConnectedRepository.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_build_v1::model::ConnectedRepository;
let x = Source::new().set_connected_repository(ConnectedRepository::default()/* use setters */);
assert!(x.connected_repository().is_some());
assert!(x.storage_source().is_none());
assert!(x.repo_source().is_none());
assert!(x.git_source().is_none());
assert!(x.storage_source_manifest().is_none());