Class Secret.Builder

  • All Implemented Interfaces:
    SecretOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Secret

    public static final class Secret.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>
    implements SecretOrBuilder
     A [Secret][google.cloud.secrets.v1beta1.Secret] is a logical secret whose value and versions can
     be accessed.
     A [Secret][google.cloud.secrets.v1beta1.Secret] is made up of zero or more [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] that
     represent the secret data.
     
    Protobuf type google.cloud.secrets.v1beta1.Secret
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>
      • clear

        public Secret.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<Secret.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<Secret.Builder>
      • getDefaultInstanceForType

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

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

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

        public Secret.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<Secret.Builder>
      • setField

        public Secret.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<Secret.Builder>
      • clearField

        public Secret.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<Secret.Builder>
      • clearOneof

        public Secret.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<Secret.Builder>
      • setRepeatedField

        public Secret.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<Secret.Builder>
      • addRepeatedField

        public Secret.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<Secret.Builder>
      • mergeFrom

        public Secret.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<Secret.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Secret.Builder>
      • mergeFrom

        public Secret.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<Secret.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface SecretOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface SecretOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Secret.Builder setName​(String value)
         Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Secret.Builder clearName()
         Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Secret.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format `projects/*/secrets/*`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasReplication

        public boolean hasReplication()
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasReplication in interface SecretOrBuilder
        Returns:
        Whether the replication field is set.
      • getReplication

        public Replication getReplication()
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getReplication in interface SecretOrBuilder
        Returns:
        The replication.
      • setReplication

        public Secret.Builder setReplication​(Replication value)
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
      • setReplication

        public Secret.Builder setReplication​(Replication.Builder builderForValue)
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
      • mergeReplication

        public Secret.Builder mergeReplication​(Replication value)
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
      • clearReplication

        public Secret.Builder clearReplication()
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
      • getReplicationBuilder

        public Replication.Builder getReplicationBuilder()
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
      • getReplicationOrBuilder

        public ReplicationOrBuilder getReplicationOrBuilder()
         Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].
         The replication policy cannot be changed after the Secret has been created.
         
        .google.cloud.secrets.v1beta1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getReplicationOrBuilder in interface SecretOrBuilder
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface SecretOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface SecretOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Secret.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Secret.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Secret.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Secret.Builder clearCreateTime()
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface SecretOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: SecretOrBuilder
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
        Specified by:
        getLabelsCount in interface SecretOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
        Specified by:
        containsLabels in interface SecretOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
        Specified by:
        getLabelsMap in interface SecretOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
        Specified by:
        getLabelsOrDefault in interface SecretOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
        Specified by:
        getLabelsOrThrow in interface SecretOrBuilder
      • removeLabels

        public Secret.Builder removeLabels​(String key)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public Secret.Builder putLabels​(String key,
                                        String value)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
      • putAllLabels

        public Secret.Builder putAllLabels​(Map<String,​String> values)
         The labels assigned to this Secret.
         Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
         of maximum 128 bytes, and must conform to the following PCRE regular
         expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
         Label values must be between 0 and 63 characters long, have a UTF-8
         encoding of maximum 128 bytes, and must conform to the following PCRE
         regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
         No more than 64 labels can be assigned to a given resource.
         
        map<string, string> labels = 4;
      • setUnknownFields

        public final Secret.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<Secret.Builder>
      • mergeUnknownFields

        public final Secret.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<Secret.Builder>