#[non_exhaustive]pub struct BuildOccurrence {
pub provenance: Option<BuildProvenance>,
pub provenance_bytes: String,
pub intoto_provenance: Option<InTotoProvenance>,
pub intoto_statement: Option<InTotoStatement>,
pub in_toto_slsa_provenance_v1: Option<InTotoSlsaProvenanceV1>,
/* private fields */
}Expand description
Details of a build occurrence.
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.provenance: Option<BuildProvenance>The actual provenance for the build.
provenance_bytes: StringSerialized JSON representation of the provenance, used in generating the
build signature in the corresponding build note. After verifying the
signature, provenance_bytes can be unmarshalled and compared to the
provenance to confirm that it is unchanged. A base64-encoded string
representation of the provenance bytes is used for the signature in order
to interoperate with openssl which expects this format for signature
verification.
The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes.
intoto_provenance: Option<InTotoProvenance>Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec.
intoto_statement: Option<InTotoStatement>In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence’s envelope.
in_toto_slsa_provenance_v1: Option<InTotoSlsaProvenanceV1>In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec, wrapped in an in-toto statement. This allows for direct jsonification of a to-spec in-toto slsa statement with a to-spec slsa provenance.
Implementations§
Source§impl BuildOccurrence
impl BuildOccurrence
pub fn new() -> Self
Sourcepub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<BuildProvenance>,
pub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<BuildProvenance>,
Sets the value of provenance.
§Example
use google_cloud_grafeas_v1::model::BuildProvenance;
let x = BuildOccurrence::new().set_provenance(BuildProvenance::default()/* use setters */);Sourcepub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<BuildProvenance>,
pub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<BuildProvenance>,
Sets or clears the value of provenance.
§Example
use google_cloud_grafeas_v1::model::BuildProvenance;
let x = BuildOccurrence::new().set_or_clear_provenance(Some(BuildProvenance::default()/* use setters */));
let x = BuildOccurrence::new().set_or_clear_provenance(None::<BuildProvenance>);Sourcepub fn set_provenance_bytes<T: Into<String>>(self, v: T) -> Self
pub fn set_provenance_bytes<T: Into<String>>(self, v: T) -> Self
Sets the value of provenance_bytes.
§Example
let x = BuildOccurrence::new().set_provenance_bytes("example");Sourcepub fn set_intoto_provenance<T>(self, v: T) -> Selfwhere
T: Into<InTotoProvenance>,
pub fn set_intoto_provenance<T>(self, v: T) -> Selfwhere
T: Into<InTotoProvenance>,
Sets the value of intoto_provenance.
§Example
use google_cloud_grafeas_v1::model::InTotoProvenance;
let x = BuildOccurrence::new().set_intoto_provenance(InTotoProvenance::default()/* use setters */);Sourcepub fn set_or_clear_intoto_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoProvenance>,
pub fn set_or_clear_intoto_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoProvenance>,
Sets or clears the value of intoto_provenance.
§Example
use google_cloud_grafeas_v1::model::InTotoProvenance;
let x = BuildOccurrence::new().set_or_clear_intoto_provenance(Some(InTotoProvenance::default()/* use setters */));
let x = BuildOccurrence::new().set_or_clear_intoto_provenance(None::<InTotoProvenance>);Sourcepub fn set_intoto_statement<T>(self, v: T) -> Selfwhere
T: Into<InTotoStatement>,
pub fn set_intoto_statement<T>(self, v: T) -> Selfwhere
T: Into<InTotoStatement>,
Sets the value of intoto_statement.
§Example
use google_cloud_grafeas_v1::model::InTotoStatement;
let x = BuildOccurrence::new().set_intoto_statement(InTotoStatement::default()/* use setters */);Sourcepub fn set_or_clear_intoto_statement<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoStatement>,
pub fn set_or_clear_intoto_statement<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoStatement>,
Sets or clears the value of intoto_statement.
§Example
use google_cloud_grafeas_v1::model::InTotoStatement;
let x = BuildOccurrence::new().set_or_clear_intoto_statement(Some(InTotoStatement::default()/* use setters */));
let x = BuildOccurrence::new().set_or_clear_intoto_statement(None::<InTotoStatement>);Sourcepub fn set_in_toto_slsa_provenance_v1<T>(self, v: T) -> Selfwhere
T: Into<InTotoSlsaProvenanceV1>,
pub fn set_in_toto_slsa_provenance_v1<T>(self, v: T) -> Selfwhere
T: Into<InTotoSlsaProvenanceV1>,
Sets the value of in_toto_slsa_provenance_v1.
§Example
use google_cloud_grafeas_v1::model::InTotoSlsaProvenanceV1;
let x = BuildOccurrence::new().set_in_toto_slsa_provenance_v1(InTotoSlsaProvenanceV1::default()/* use setters */);Sourcepub fn set_or_clear_in_toto_slsa_provenance_v1<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoSlsaProvenanceV1>,
pub fn set_or_clear_in_toto_slsa_provenance_v1<T>(self, v: Option<T>) -> Selfwhere
T: Into<InTotoSlsaProvenanceV1>,
Sets or clears the value of in_toto_slsa_provenance_v1.
§Example
use google_cloud_grafeas_v1::model::InTotoSlsaProvenanceV1;
let x = BuildOccurrence::new().set_or_clear_in_toto_slsa_provenance_v1(Some(InTotoSlsaProvenanceV1::default()/* use setters */));
let x = BuildOccurrence::new().set_or_clear_in_toto_slsa_provenance_v1(None::<InTotoSlsaProvenanceV1>);Trait Implementations§
Source§impl Clone for BuildOccurrence
impl Clone for BuildOccurrence
Source§fn clone(&self) -> BuildOccurrence
fn clone(&self) -> BuildOccurrence
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more