Class InTotoStatement.Builder (2.9.0)

public static final class InTotoStatement.Builder extends GeneratedMessageV3.Builder<InTotoStatement.Builder> implements InTotoStatementOrBuilder

Spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement The serialized InTotoStatement will be stored as Envelope.payload. Envelope.payloadType is always "application/vnd.in-toto+json".

Protobuf type grafeas.v1.InTotoStatement

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllSubject(Iterable<? extends Subject> values)

public InTotoStatement.Builder addAllSubject(Iterable<? extends Subject> values)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
valuesIterable<? extends io.grafeas.v1.Subject>
Returns

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public InTotoStatement.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

addSubject(int index, Subject value)

public InTotoStatement.Builder addSubject(int index, Subject value)

repeated .grafeas.v1.Subject subject = 2;

Parameters
NameDescription
indexint
valueSubject
Returns

addSubject(int index, Subject.Builder builderForValue)

public InTotoStatement.Builder addSubject(int index, Subject.Builder builderForValue)

repeated .grafeas.v1.Subject subject = 2;

Parameters
NameDescription
indexint
builderForValueSubject.Builder
Returns

addSubject(Subject value)

public InTotoStatement.Builder addSubject(Subject value)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
valueSubject
Returns

addSubject(Subject.Builder builderForValue)

public InTotoStatement.Builder addSubject(Subject.Builder builderForValue)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
builderForValueSubject.Builder
Returns

addSubjectBuilder()

public Subject.Builder addSubjectBuilder()

repeated .grafeas.v1.Subject subject = 2;

Returns
TypeDescription
Subject.Builder

addSubjectBuilder(int index)

public Subject.Builder addSubjectBuilder(int index)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Subject.Builder

build()

public InTotoStatement build()
Returns
TypeDescription
InTotoStatement

buildPartial()

public InTotoStatement buildPartial()
Returns
TypeDescription
InTotoStatement

clear()

public InTotoStatement.Builder clear()
Returns Overrides

clearField(Descriptors.FieldDescriptor field)

public InTotoStatement.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public InTotoStatement.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns Overrides

clearPredicate()

public InTotoStatement.Builder clearPredicate()
Returns

clearPredicateType()

public InTotoStatement.Builder clearPredicateType()

https://slsa.dev/provenance/v0.1 for SlsaProvenance.

string predicate_type = 3;

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

clearProvenance()

public InTotoStatement.Builder clearProvenance()

.grafeas.v1.InTotoProvenance provenance = 4;

Returns

clearSlsaProvenance()

public InTotoStatement.Builder clearSlsaProvenance()

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Returns

clearSlsaProvenanceZeroTwo()

public InTotoStatement.Builder clearSlsaProvenanceZeroTwo()

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Returns

clearSubject()

public InTotoStatement.Builder clearSubject()

repeated .grafeas.v1.Subject subject = 2;

Returns

clearType()

public InTotoStatement.Builder clearType()

Always https://in-toto.io/Statement/v0.1.

string type = 1 [json_name = "_type"];

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

clone()

public InTotoStatement.Builder clone()
Returns Overrides

getDefaultInstanceForType()

public InTotoStatement getDefaultInstanceForType()
Returns
TypeDescription
InTotoStatement

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPredicateCase()

public InTotoStatement.PredicateCase getPredicateCase()
Returns

getPredicateType()

public String getPredicateType()

https://slsa.dev/provenance/v0.1 for SlsaProvenance.

string predicate_type = 3;

Returns
TypeDescription
String

The predicateType.

getPredicateTypeBytes()

public ByteString getPredicateTypeBytes()

https://slsa.dev/provenance/v0.1 for SlsaProvenance.

string predicate_type = 3;

Returns
TypeDescription
ByteString

The bytes for predicateType.

getProvenance()

public InTotoProvenance getProvenance()

.grafeas.v1.InTotoProvenance provenance = 4;

Returns
TypeDescription
InTotoProvenance

The provenance.

getProvenanceBuilder()

public InTotoProvenance.Builder getProvenanceBuilder()

.grafeas.v1.InTotoProvenance provenance = 4;

Returns

getProvenanceOrBuilder()

public InTotoProvenanceOrBuilder getProvenanceOrBuilder()

.grafeas.v1.InTotoProvenance provenance = 4;

Returns

getSlsaProvenance()

public SlsaProvenance getSlsaProvenance()

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Returns
TypeDescription
SlsaProvenance

The slsaProvenance.

getSlsaProvenanceBuilder()

public SlsaProvenance.Builder getSlsaProvenanceBuilder()

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Returns
TypeDescription
SlsaProvenance.Builder

getSlsaProvenanceOrBuilder()

public SlsaProvenanceOrBuilder getSlsaProvenanceOrBuilder()

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Returns

getSlsaProvenanceZeroTwo()

public SlsaProvenanceZeroTwo getSlsaProvenanceZeroTwo()

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Returns
TypeDescription
SlsaProvenanceZeroTwo

The slsaProvenanceZeroTwo.

getSlsaProvenanceZeroTwoBuilder()

public SlsaProvenanceZeroTwo.Builder getSlsaProvenanceZeroTwoBuilder()

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Returns

getSlsaProvenanceZeroTwoOrBuilder()

public SlsaProvenanceZeroTwoOrBuilder getSlsaProvenanceZeroTwoOrBuilder()

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Returns

getSubject(int index)

public Subject getSubject(int index)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Subject

getSubjectBuilder(int index)

public Subject.Builder getSubjectBuilder(int index)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Subject.Builder

getSubjectBuilderList()

public List<Subject.Builder> getSubjectBuilderList()

repeated .grafeas.v1.Subject subject = 2;

Returns
TypeDescription
List<Builder>

getSubjectCount()

public int getSubjectCount()

repeated .grafeas.v1.Subject subject = 2;

Returns
TypeDescription
int

getSubjectList()

public List<Subject> getSubjectList()

repeated .grafeas.v1.Subject subject = 2;

Returns
TypeDescription
List<Subject>

getSubjectOrBuilder(int index)

public SubjectOrBuilder getSubjectOrBuilder(int index)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
SubjectOrBuilder

getSubjectOrBuilderList()

public List<? extends SubjectOrBuilder> getSubjectOrBuilderList()

repeated .grafeas.v1.Subject subject = 2;

Returns
TypeDescription
List<? extends io.grafeas.v1.SubjectOrBuilder>

getType()

public String getType()

Always https://in-toto.io/Statement/v0.1.

string type = 1 [json_name = "_type"];

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

Always https://in-toto.io/Statement/v0.1.

string type = 1 [json_name = "_type"];

Returns
TypeDescription
ByteString

The bytes for type.

hasProvenance()

public boolean hasProvenance()

.grafeas.v1.InTotoProvenance provenance = 4;

Returns
TypeDescription
boolean

Whether the provenance field is set.

hasSlsaProvenance()

public boolean hasSlsaProvenance()

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Returns
TypeDescription
boolean

Whether the slsaProvenance field is set.

hasSlsaProvenanceZeroTwo()

public boolean hasSlsaProvenanceZeroTwo()

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Returns
TypeDescription
boolean

Whether the slsaProvenanceZeroTwo field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public InTotoStatement.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public InTotoStatement.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns Overrides

mergeFrom(InTotoStatement other)

public InTotoStatement.Builder mergeFrom(InTotoStatement other)
Parameter
NameDescription
otherInTotoStatement
Returns

mergeProvenance(InTotoProvenance value)

public InTotoStatement.Builder mergeProvenance(InTotoProvenance value)

.grafeas.v1.InTotoProvenance provenance = 4;

Parameter
NameDescription
valueInTotoProvenance
Returns

mergeSlsaProvenance(SlsaProvenance value)

public InTotoStatement.Builder mergeSlsaProvenance(SlsaProvenance value)

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Parameter
NameDescription
valueSlsaProvenance
Returns

mergeSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo value)

public InTotoStatement.Builder mergeSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo value)

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Parameter
NameDescription
valueSlsaProvenanceZeroTwo
Returns

mergeUnknownFields(UnknownFieldSet unknownFields)

public final InTotoStatement.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides

removeSubject(int index)

public InTotoStatement.Builder removeSubject(int index)

repeated .grafeas.v1.Subject subject = 2;

Parameter
NameDescription
indexint
Returns

setField(Descriptors.FieldDescriptor field, Object value)

public InTotoStatement.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

setPredicateType(String value)

public InTotoStatement.Builder setPredicateType(String value)

https://slsa.dev/provenance/v0.1 for SlsaProvenance.

string predicate_type = 3;

Parameter
NameDescription
valueString

The predicateType to set.

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

setPredicateTypeBytes(ByteString value)

public InTotoStatement.Builder setPredicateTypeBytes(ByteString value)

https://slsa.dev/provenance/v0.1 for SlsaProvenance.

string predicate_type = 3;

Parameter
NameDescription
valueByteString

The bytes for predicateType to set.

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

setProvenance(InTotoProvenance value)

public InTotoStatement.Builder setProvenance(InTotoProvenance value)

.grafeas.v1.InTotoProvenance provenance = 4;

Parameter
NameDescription
valueInTotoProvenance
Returns

setProvenance(InTotoProvenance.Builder builderForValue)

public InTotoStatement.Builder setProvenance(InTotoProvenance.Builder builderForValue)

.grafeas.v1.InTotoProvenance provenance = 4;

Parameter
NameDescription
builderForValueInTotoProvenance.Builder
Returns

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public InTotoStatement.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns Overrides

setSlsaProvenance(SlsaProvenance value)

public InTotoStatement.Builder setSlsaProvenance(SlsaProvenance value)

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Parameter
NameDescription
valueSlsaProvenance
Returns

setSlsaProvenance(SlsaProvenance.Builder builderForValue)

public InTotoStatement.Builder setSlsaProvenance(SlsaProvenance.Builder builderForValue)

.grafeas.v1.SlsaProvenance slsa_provenance = 5;

Parameter
NameDescription
builderForValueSlsaProvenance.Builder
Returns

setSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo value)

public InTotoStatement.Builder setSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo value)

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Parameter
NameDescription
valueSlsaProvenanceZeroTwo
Returns

setSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo.Builder builderForValue)

public InTotoStatement.Builder setSlsaProvenanceZeroTwo(SlsaProvenanceZeroTwo.Builder builderForValue)

.grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;

Parameter
NameDescription
builderForValueSlsaProvenanceZeroTwo.Builder
Returns

setSubject(int index, Subject value)

public InTotoStatement.Builder setSubject(int index, Subject value)

repeated .grafeas.v1.Subject subject = 2;

Parameters
NameDescription
indexint
valueSubject
Returns

setSubject(int index, Subject.Builder builderForValue)

public InTotoStatement.Builder setSubject(int index, Subject.Builder builderForValue)

repeated .grafeas.v1.Subject subject = 2;

Parameters
NameDescription
indexint
builderForValueSubject.Builder
Returns

setType(String value)

public InTotoStatement.Builder setType(String value)

Always https://in-toto.io/Statement/v0.1.

string type = 1 [json_name = "_type"];

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public InTotoStatement.Builder setTypeBytes(ByteString value)

Always https://in-toto.io/Statement/v0.1.

string type = 1 [json_name = "_type"];

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
InTotoStatement.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final InTotoStatement.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides