#[non_exhaustive]pub struct SourceProvenance {
pub resolved_storage_source: Option<StorageSource>,
pub resolved_repo_source: Option<RepoSource>,
pub resolved_storage_source_manifest: Option<StorageSourceManifest>,
pub resolved_connected_repository: Option<ConnectedRepository>,
pub resolved_git_source: Option<GitSource>,
pub file_hashes: HashMap<String, FileHashes>,
/* private fields */
}Expand description
Provenance of the source. Ways to find the original source, or verify that some source was used for this build.
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.resolved_storage_source: Option<StorageSource>A copy of the build’s source.storage_source, if exists, with any
generations resolved.
resolved_repo_source: Option<RepoSource>A copy of the build’s source.repo_source, if exists, with any
revisions resolved.
resolved_storage_source_manifest: Option<StorageSourceManifest>A copy of the build’s source.storage_source_manifest, if exists, with any
revisions resolved.
This feature is in Preview.
resolved_connected_repository: Option<ConnectedRepository>Output only. A copy of the build’s source.connected_repository, if
exists, with any revisions resolved.
resolved_git_source: Option<GitSource>Output only. A copy of the build’s source.git_source, if exists, with any
revisions resolved.
file_hashes: HashMap<String, FileHashes>Output only. Hash(es) of the build source, which can be used to verify that
the original source integrity was maintained in the build. Note that
FileHashes will only be populated if BuildOptions has requested a
SourceProvenanceHash.
The keys to this map are file paths used as build source and the values contain the hash values for those files.
If the build source came in a single package such as a gzipped tarfile
(.tar.gz), the FileHash will be for the single path to that file.
Implementations§
Source§impl SourceProvenance
impl SourceProvenance
pub fn new() -> Self
Sourcepub fn set_resolved_storage_source<T>(self, v: T) -> Selfwhere
T: Into<StorageSource>,
pub fn set_resolved_storage_source<T>(self, v: T) -> Selfwhere
T: Into<StorageSource>,
Sets the value of resolved_storage_source.
§Example
use google_cloud_build_v1::model::StorageSource;
let x = SourceProvenance::new().set_resolved_storage_source(StorageSource::default()/* use setters */);Sourcepub fn set_or_clear_resolved_storage_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageSource>,
pub fn set_or_clear_resolved_storage_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageSource>,
Sets or clears the value of resolved_storage_source.
§Example
use google_cloud_build_v1::model::StorageSource;
let x = SourceProvenance::new().set_or_clear_resolved_storage_source(Some(StorageSource::default()/* use setters */));
let x = SourceProvenance::new().set_or_clear_resolved_storage_source(None::<StorageSource>);Sourcepub fn set_resolved_repo_source<T>(self, v: T) -> Selfwhere
T: Into<RepoSource>,
pub fn set_resolved_repo_source<T>(self, v: T) -> Selfwhere
T: Into<RepoSource>,
Sets the value of resolved_repo_source.
§Example
use google_cloud_build_v1::model::RepoSource;
let x = SourceProvenance::new().set_resolved_repo_source(RepoSource::default()/* use setters */);Sourcepub fn set_or_clear_resolved_repo_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<RepoSource>,
pub fn set_or_clear_resolved_repo_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<RepoSource>,
Sets or clears the value of resolved_repo_source.
§Example
use google_cloud_build_v1::model::RepoSource;
let x = SourceProvenance::new().set_or_clear_resolved_repo_source(Some(RepoSource::default()/* use setters */));
let x = SourceProvenance::new().set_or_clear_resolved_repo_source(None::<RepoSource>);Sourcepub fn set_resolved_storage_source_manifest<T>(self, v: T) -> Selfwhere
T: Into<StorageSourceManifest>,
pub fn set_resolved_storage_source_manifest<T>(self, v: T) -> Selfwhere
T: Into<StorageSourceManifest>,
Sets the value of resolved_storage_source_manifest.
§Example
use google_cloud_build_v1::model::StorageSourceManifest;
let x = SourceProvenance::new().set_resolved_storage_source_manifest(StorageSourceManifest::default()/* use setters */);Sourcepub fn set_or_clear_resolved_storage_source_manifest<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<StorageSourceManifest>,
pub fn set_or_clear_resolved_storage_source_manifest<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<StorageSourceManifest>,
Sets or clears the value of resolved_storage_source_manifest.
§Example
use google_cloud_build_v1::model::StorageSourceManifest;
let x = SourceProvenance::new().set_or_clear_resolved_storage_source_manifest(Some(StorageSourceManifest::default()/* use setters */));
let x = SourceProvenance::new().set_or_clear_resolved_storage_source_manifest(None::<StorageSourceManifest>);Sourcepub fn set_resolved_connected_repository<T>(self, v: T) -> Selfwhere
T: Into<ConnectedRepository>,
pub fn set_resolved_connected_repository<T>(self, v: T) -> Selfwhere
T: Into<ConnectedRepository>,
Sets the value of resolved_connected_repository.
§Example
use google_cloud_build_v1::model::ConnectedRepository;
let x = SourceProvenance::new().set_resolved_connected_repository(ConnectedRepository::default()/* use setters */);Sourcepub fn set_or_clear_resolved_connected_repository<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConnectedRepository>,
pub fn set_or_clear_resolved_connected_repository<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConnectedRepository>,
Sets or clears the value of resolved_connected_repository.
§Example
use google_cloud_build_v1::model::ConnectedRepository;
let x = SourceProvenance::new().set_or_clear_resolved_connected_repository(Some(ConnectedRepository::default()/* use setters */));
let x = SourceProvenance::new().set_or_clear_resolved_connected_repository(None::<ConnectedRepository>);Sourcepub fn set_resolved_git_source<T>(self, v: T) -> Self
pub fn set_resolved_git_source<T>(self, v: T) -> Self
Sets the value of resolved_git_source.
§Example
use google_cloud_build_v1::model::GitSource;
let x = SourceProvenance::new().set_resolved_git_source(GitSource::default()/* use setters */);Sourcepub fn set_or_clear_resolved_git_source<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_resolved_git_source<T>(self, v: Option<T>) -> Self
Sets or clears the value of resolved_git_source.
§Example
use google_cloud_build_v1::model::GitSource;
let x = SourceProvenance::new().set_or_clear_resolved_git_source(Some(GitSource::default()/* use setters */));
let x = SourceProvenance::new().set_or_clear_resolved_git_source(None::<GitSource>);Sourcepub fn set_file_hashes<T, K, V>(self, v: T) -> Self
pub fn set_file_hashes<T, K, V>(self, v: T) -> Self
Sets the value of file_hashes.
§Example
use google_cloud_build_v1::model::FileHashes;
let x = SourceProvenance::new().set_file_hashes([
("key0", FileHashes::default()/* use setters */),
("key1", FileHashes::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for SourceProvenance
impl Clone for SourceProvenance
Source§fn clone(&self) -> SourceProvenance
fn clone(&self) -> SourceProvenance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more