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 Type
    Method
    Description
     
     
     
    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.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    An ID for the key used to sign.
    com.google.protobuf.ByteString
    An ID for the key used to sign.
    The type of the key, either stored in `public_key` or referenced in `key_id`.
    int
    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.
    com.google.protobuf.ByteString
    Public key of the builder which can be used to verify that the related findings are valid and unchanged.
    com.google.protobuf.ByteString
    Required.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    An ID for the key used to sign.
    setKeyIdBytes(com.google.protobuf.ByteString value)
    An ID for the key used to sign.
    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`.
    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, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
    • clear

      public BuildSignature.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<BuildSignature.Builder>
    • getDefaultInstanceForType

      public BuildSignature getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public BuildSignature build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BuildSignature buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public BuildSignature.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BuildSignature.Builder>
    • mergeFrom

      public BuildSignature.Builder mergeFrom(BuildSignature other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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 interface BuildSignatureOrBuilder
      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

      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.