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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)BuildSignaturebuild()BuildSignaturebuildPartial()BuildSignature.Builderclear()BuildSignature.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)BuildSignature.BuilderclearKeyId()An ID for the key used to sign.BuildSignature.BuilderclearKeyType()The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)BuildSignature.BuilderclearPublicKey()Public key of the builder which can be used to verify that the related findings are valid and unchanged.BuildSignature.BuilderclearSignature()Required.BuildSignature.Builderclone()BuildSignaturegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetKeyId()An ID for the key used to sign.com.google.protobuf.ByteStringgetKeyIdBytes()An ID for the key used to sign.BuildSignature.KeyTypegetKeyType()The type of the key, either stored in `public_key` or referenced in `key_id`.intgetKeyTypeValue()The type of the key, either stored in `public_key` or referenced in `key_id`.StringgetPublicKey()Public key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteStringgetPublicKeyBytes()Public key of the builder which can be used to verify that the related findings are valid and unchanged.com.google.protobuf.ByteStringgetSignature()Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()BuildSignature.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)BuildSignature.BuildermergeFrom(com.google.protobuf.Message other)BuildSignature.BuildermergeFrom(BuildSignature other)BuildSignature.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)BuildSignature.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)BuildSignature.BuildersetKeyId(String value)An ID for the key used to sign.BuildSignature.BuildersetKeyIdBytes(com.google.protobuf.ByteString value)An ID for the key used to sign.BuildSignature.BuildersetKeyType(BuildSignature.KeyType value)The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.BuildersetKeyTypeValue(int value)The type of the key, either stored in `public_key` or referenced in `key_id`.BuildSignature.BuildersetPublicKey(String value)Public key of the builder which can be used to verify that the related findings are valid and unchanged.BuildSignature.BuildersetPublicKeyBytes(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.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)BuildSignature.BuildersetSignature(com.google.protobuf.ByteString value)Required.BuildSignature.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clear
public BuildSignature.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
getDefaultInstanceForType
public BuildSignature getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public BuildSignature build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public BuildSignature buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public BuildSignature.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
setField
public BuildSignature.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clearField
public BuildSignature.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
clearOneof
public BuildSignature.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
setRepeatedField
public BuildSignature.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
addRepeatedField
public BuildSignature.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>
-
mergeFrom
public BuildSignature.Builder mergeFrom(BuildSignature other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
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 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:
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 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:
getSignaturein 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:
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
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:
getKeyTypeValuein 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:
getKeyTypein 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
mergeUnknownFields
public final BuildSignature.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
-
-