Class 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 type grafeas.v1beta1.build.BuildSignature
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public BuildSignature.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
      • setField

        public BuildSignature.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
      • clearField

        public BuildSignature.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
      • clearOneof

        public BuildSignature.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
      • addRepeatedField

        public BuildSignature.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.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>
      • isInitialized

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

        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 interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>
      • mergeUnknownFields

        public final BuildSignature.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BuildSignature.Builder>