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.GeneratedMessage.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.GeneratedMessage.Builder<BuildSignature.Builder>
implements BuildSignatureOrBuilder
Message encapsulating the signature of the verified build.Protobuf type
grafeas.v1beta1.build.BuildSignature-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()An ID for the key used to sign.The type of the key, either stored in `public_key` or referenced in `key_id`.Public key of the builder which can be used to verify that the related findings are valid and unchanged.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetKeyId()An ID for the key used to sign.com.google.protobuf.ByteStringAn ID for the key used to sign.The type of the key, either stored in `public_key` or referenced in `key_id`.intThe type of the key, either stored in `public_key` or referenced in `key_id`.Public key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteStringPublic key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(BuildSignature other) An ID for the key used to sign.setKeyIdBytes(com.google.protobuf.ByteString value) An ID for the key used to sign.setKeyType(BuildSignature.KeyType value) The type of the key, either stored in `public_key` or referenced in `key_id`.setKeyTypeValue(int value) The type of the key, either stored in `public_key` or referenced in `key_id`.setPublicKey(String value) Public key of the builder which can be used to verify that the related findings are valid and unchanged.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.setSignature(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>- Throws:
IOException
-
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:
getPublicKeyin 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:
getPublicKeyBytesin interfaceBuildSignatureOrBuilder- Returns:
- The bytes for publicKey.
-
setPublicKey
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 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 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:
getSignaturein interfaceBuildSignatureOrBuilder- Returns:
- The signature.
-
setSignature
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
Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded.
bytes signature = 2;- Returns:
- This builder for chaining.
-
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:
getKeyIdin 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:
getKeyIdBytesin interfaceBuildSignatureOrBuilder- Returns:
- The bytes for keyId.
-
setKeyId
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
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
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:
getKeyTypeValuein interfaceBuildSignatureOrBuilder- Returns:
- The enum numeric value on the wire for keyType.
-
setKeyTypeValue
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
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:
getKeyTypein interfaceBuildSignatureOrBuilder- Returns:
- The keyType.
-
setKeyType
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
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.
-