# Grafeas V1 API - Class Grafeas::V1::BuildOccurrence (v1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.1 1.2.0 1.1.1 1.0.0 0.16.1 0.15.0 0.14.2 0.13.0 0.12.1 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.1 Reference documentation and code samples for the Grafeas V1 API class Grafeas::V1::BuildOccurrence.

Details of a build occurrence.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #in_toto_slsa_provenance_v1

    def in_toto_slsa_provenance_v1() -> ::Grafeas::V1::InTotoSlsaProvenanceV1

**Returns**

- ([::Grafeas::V1::InTotoSlsaProvenanceV1](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.

### #in_toto_slsa_provenance_v1=

    def in_toto_slsa_provenance_v1=(value) -> ::Grafeas::V1::InTotoSlsaProvenanceV1

**Parameter**

- **value** ([::Grafeas::V1::InTotoSlsaProvenanceV1](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.
**Returns**

- ([::Grafeas::V1::InTotoSlsaProvenanceV1](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.

### #intoto_provenance

    def intoto_provenance() -> ::Grafeas::V1::InTotoProvenance

**Returns**

- ([::Grafeas::V1::InTotoProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-InTotoProvenance)) --- Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec.

### #intoto_provenance=

    def intoto_provenance=(value) -> ::Grafeas::V1::InTotoProvenance

**Parameter**

- **value** ([::Grafeas::V1::InTotoProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-InTotoProvenance)) --- Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec.
**Returns**

- ([::Grafeas::V1::InTotoProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-InTotoProvenance)) --- Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec.

### #intoto_statement

    def intoto_statement() -> ::Grafeas::V1::InTotoStatement

**Returns**

- ([::Grafeas::V1::InTotoStatement](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.

### #intoto_statement=

    def intoto_statement=(value) -> ::Grafeas::V1::InTotoStatement

**Parameter**

- **value** ([::Grafeas::V1::InTotoStatement](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.
**Returns**

- ([::Grafeas::V1::InTotoStatement](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-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.

### #provenance

    def provenance() -> ::Grafeas::V1::BuildProvenance

**Returns**

- ([::Grafeas::V1::BuildProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-BuildProvenance)) --- The actual provenance for the build.

### #provenance=

    def provenance=(value) -> ::Grafeas::V1::BuildProvenance

**Parameter**

- **value** ([::Grafeas::V1::BuildProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-BuildProvenance)) --- The actual provenance for the build.
**Returns**

- ([::Grafeas::V1::BuildProvenance](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-BuildProvenance)) --- The actual provenance for the build.

### #provenance_bytes

    def provenance_bytes() -> ::String

**Returns**

- (::String) --- Serialized 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.

### #provenance_bytes=

    def provenance_bytes=(value) -> ::String

**Parameter**

- **value** (::String) --- Serialized 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.
**Returns**

- (::String) --- Serialized 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.