Package io.grafeas.v1beta1.build
Class BuildSignature.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
- io.grafeas.v1beta1.build.BuildSignature.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,BuildSignatureOrBuilder
,Cloneable
- Enclosing class:
- BuildSignature
public static final class BuildSignature.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder> implements BuildSignatureOrBuilder
Message encapsulating the signature of the verified build.
Protobuf typegrafeas.v1beta1.build.BuildSignature
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildSignature.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
BuildSignature
build()
BuildSignature
buildPartial()
BuildSignature.Builder
clear()
BuildSignature.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
BuildSignature.Builder
clearKeyId()
An ID for the key used to sign.BuildSignature.Builder
clearKeyType()
The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
BuildSignature.Builder
clearPublicKey()
Public key of the builder which can be used to verify that the related findings are valid and unchanged.BuildSignature.Builder
clearSignature()
Required.BuildSignature.Builder
clone()
BuildSignature
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getKeyId()
An ID for the key used to sign.com.google.protobuf.ByteString
getKeyIdBytes()
An ID for the key used to sign.BuildSignature.KeyType
getKeyType()
The type of the key, either stored in `public_key` or referenced in `key_id`.int
getKeyTypeValue()
The type of the key, either stored in `public_key` or referenced in `key_id`.String
getPublicKey()
Public key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteString
getPublicKeyBytes()
Public key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteString
getSignature()
Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
BuildSignature.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
BuildSignature.Builder
mergeFrom(com.google.protobuf.Message other)
BuildSignature.Builder
mergeFrom(BuildSignature other)
BuildSignature.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
BuildSignature.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
BuildSignature.Builder
setKeyId(String value)
An ID for the key used to sign.BuildSignature.Builder
setKeyIdBytes(com.google.protobuf.ByteString value)
An ID for the key used to sign.BuildSignature.Builder
setKeyType(BuildSignature.KeyType value)
The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.Builder
setKeyTypeValue(int value)
The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.Builder
setPublicKey(String value)
Public key of the builder which can be used to verify that the related findings are valid and unchanged.BuildSignature.Builder
setPublicKeyBytes(com.google.protobuf.ByteString value)
Public key of the builder which can be used to verify that the related findings are valid and unchanged.BuildSignature.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
BuildSignature.Builder
setSignature(com.google.protobuf.ByteString value)
Required.BuildSignature.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clear
public BuildSignature.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
getDefaultInstanceForType
public BuildSignature getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public BuildSignature build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public BuildSignature buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public BuildSignature.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
setField
public BuildSignature.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clearField
public BuildSignature.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clearOneof
public BuildSignature.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
setRepeatedField
public BuildSignature.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
addRepeatedField
public BuildSignature.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(BuildSignature other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>
- Throws:
IOException
-
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;
- Specified by:
getPublicKey
in interfaceBuildSignatureOrBuilder
- Returns:
- The publicKey.
-
getPublicKeyBytes
public com.google.protobuf.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;
- Specified by:
getPublicKeyBytes
in interfaceBuildSignatureOrBuilder
- Returns:
- The bytes for publicKey.
-
setPublicKey
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;
- Parameters:
value
- The publicKey to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setPublicKeyBytes
public BuildSignature.Builder setPublicKeyBytes(com.google.protobuf.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;
- Parameters:
value
- The bytes for publicKey to set.- Returns:
- This builder for chaining.
-
getSignature
public com.google.protobuf.ByteString getSignature()
Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded.
bytes signature = 2;
- Specified by:
getSignature
in interfaceBuildSignatureOrBuilder
- Returns:
- The signature.
-
setSignature
public BuildSignature.Builder setSignature(com.google.protobuf.ByteString value)
Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded.
bytes signature = 2;
- Parameters:
value
- The signature to set.- Returns:
- 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:
- This builder for chaining.
-
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;
- Specified by:
getKeyId
in interfaceBuildSignatureOrBuilder
- Returns:
- The keyId.
-
getKeyIdBytes
public com.google.protobuf.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;
- Specified by:
getKeyIdBytes
in interfaceBuildSignatureOrBuilder
- Returns:
- The bytes for keyId.
-
setKeyId
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;
- Parameters:
value
- The keyId to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setKeyIdBytes
public BuildSignature.Builder setKeyIdBytes(com.google.protobuf.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;
- Parameters:
value
- The bytes for keyId to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getKeyTypeValue
in interfaceBuildSignatureOrBuilder
- Returns:
- The enum numeric value on the wire for keyType.
-
setKeyTypeValue
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;
- Parameters:
value
- The enum numeric value on the wire for keyType to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getKeyType
in interfaceBuildSignatureOrBuilder
- Returns:
- The keyType.
-
setKeyType
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;
- Parameters:
value
- The keyType to set.- Returns:
- 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:
- This builder for chaining.
-
setUnknownFields
public final BuildSignature.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
mergeUnknownFields
public final BuildSignature.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
-