Class BuildSignature.Builder (2.15.0)

public static final class BuildSignature.Builder extends GeneratedMessageV3.Builder<BuildSignature.Builder> implements BuildSignatureOrBuilder

Message encapsulating the signature of the verified build.

Protobuf type grafeas.v1beta1.build.BuildSignature

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BuildSignature build()
Returns
TypeDescription
BuildSignature

buildPartial()

public BuildSignature buildPartial()
Returns
TypeDescription
BuildSignature

clear()

public BuildSignature.Builder clear()
Returns
TypeDescription
BuildSignature.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearKeyId()

public BuildSignature.Builder clearKeyId()

An ID for the key used to sign. This could be either an ID for the key stored in public_key (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).

string key_id = 3;

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

clearKeyType()

public BuildSignature.Builder clearKeyType()

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPublicKey()

public BuildSignature.Builder clearPublicKey()

Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type is empty, this defaults to PEM encoded public keys. This field may be empty if key_id references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin

string public_key = 1;

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

clearSignature()

public BuildSignature.Builder clearSignature()

Required. Signature of the related BuildProvenance. In JSON, this is base-64 encoded.

bytes signature = 2;

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

clone()

public BuildSignature.Builder clone()
Returns
TypeDescription
BuildSignature.Builder
Overrides

getDefaultInstanceForType()

public BuildSignature getDefaultInstanceForType()
Returns
TypeDescription
BuildSignature

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKeyId()

public String getKeyId()

An ID for the key used to sign. This could be either an ID for the key stored in public_key (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).

string key_id = 3;

Returns
TypeDescription
String

The keyId.

getKeyIdBytes()

public ByteString getKeyIdBytes()

An ID for the key used to sign. This could be either an ID for the key stored in public_key (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).

string key_id = 3;

Returns
TypeDescription
ByteString

The bytes for keyId.

getKeyType()

public BuildSignature.KeyType getKeyType()

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Returns
TypeDescription
BuildSignature.KeyType

The keyType.

getKeyTypeValue()

public int getKeyTypeValue()

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for keyType.

getPublicKey()

public String getPublicKey()

Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type is empty, this defaults to PEM encoded public keys. This field may be empty if key_id references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin

string public_key = 1;

Returns
TypeDescription
String

The publicKey.

getPublicKeyBytes()

public ByteString getPublicKeyBytes()

Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type is empty, this defaults to PEM encoded public keys. This field may be empty if key_id references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin

string public_key = 1;

Returns
TypeDescription
ByteString

The bytes for publicKey.

getSignature()

public ByteString getSignature()

Required. Signature of the related BuildProvenance. In JSON, this is base-64 encoded.

bytes signature = 2;

Returns
TypeDescription
ByteString

The signature.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(BuildSignature other)

public BuildSignature.Builder mergeFrom(BuildSignature other)
Parameter
NameDescription
otherBuildSignature
Returns
TypeDescription
BuildSignature.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setKeyId(String value)

public BuildSignature.Builder setKeyId(String value)

An ID for the key used to sign. This could be either an ID for the key stored in public_key (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).

string key_id = 3;

Parameter
NameDescription
valueString

The keyId to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setKeyIdBytes(ByteString value)

public BuildSignature.Builder setKeyIdBytes(ByteString value)

An ID for the key used to sign. This could be either an ID for the key stored in public_key (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).

string key_id = 3;

Parameter
NameDescription
valueByteString

The bytes for keyId to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setKeyType(BuildSignature.KeyType value)

public BuildSignature.Builder setKeyType(BuildSignature.KeyType value)

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Parameter
NameDescription
valueBuildSignature.KeyType

The keyType to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setKeyTypeValue(int value)

public BuildSignature.Builder setKeyTypeValue(int value)

The type of the key, either stored in public_key or referenced in key_id.

.grafeas.v1beta1.build.BuildSignature.KeyType key_type = 4;

Parameter
NameDescription
valueint

The enum numeric value on the wire for keyType to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setPublicKey(String value)

public BuildSignature.Builder setPublicKey(String value)

Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type is empty, this defaults to PEM encoded public keys. This field may be empty if key_id references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin

string public_key = 1;

Parameter
NameDescription
valueString

The publicKey to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setPublicKeyBytes(ByteString value)

public BuildSignature.Builder setPublicKeyBytes(ByteString value)

Public key of the builder which can be used to verify that the related findings are valid and unchanged. If key_type is empty, this defaults to PEM encoded public keys. This field may be empty if key_id references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from BuildDetails are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: openssl sha256 -verify public.pem -signature signature.bin signed.bin

string public_key = 1;

Parameter
NameDescription
valueByteString

The bytes for publicKey to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

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

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

setSignature(ByteString value)

public BuildSignature.Builder setSignature(ByteString value)

Required. Signature of the related BuildProvenance. In JSON, this is base-64 encoded.

bytes signature = 2;

Parameter
NameDescription
valueByteString

The signature to set.

Returns
TypeDescription
BuildSignature.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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