Class Generated.Secret.Builder

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

    public static final class Generated.Secret.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.Secret.Builder>
    implements Generated.SecretOrBuilder
     Secret holds secret data of a certain type. The total bytes of the values in
     the Data field must be less than MaxSecretSize bytes.
     
    Protobuf type k8s.io.api.core.v1.Secret
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)
        Overrides:
        internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.Secret.Builder>
      • internalGetMutableMapFieldReflection

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public boolean hasMetadata()
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
        Specified by:
        hasMetadata in interface Generated.SecretOrBuilder
        Returns:
        Whether the metadata field is set.
      • getMetadata

        public Generated.ObjectMeta getMetadata()
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
        Specified by:
        getMetadata in interface Generated.SecretOrBuilder
        Returns:
        The metadata.
      • setMetadata

        public Generated.Secret.Builder setMetadata​(Generated.ObjectMeta value)
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      • setMetadata

        public Generated.Secret.Builder setMetadata​(Generated.ObjectMeta.Builder builderForValue)
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      • mergeMetadata

        public Generated.Secret.Builder mergeMetadata​(Generated.ObjectMeta value)
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      • clearMetadata

        public Generated.Secret.Builder clearMetadata()
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      • getMetadataBuilder

        public Generated.ObjectMeta.Builder getMetadataBuilder()
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      • getMetadataOrBuilder

        public Generated.ObjectMetaOrBuilder getMetadataOrBuilder()
         Standard object's metadata.
         More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         +optional
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
        Specified by:
        getMetadataOrBuilder in interface Generated.SecretOrBuilder
      • hasImmutable

        public boolean hasImmutable()
         Immutable, if set to true, ensures that data stored in the Secret cannot
         be updated (only object metadata can be modified).
         If not set to true, the field can be modified at any time.
         Defaulted to nil.
         +optional
         
        optional bool immutable = 5;
        Specified by:
        hasImmutable in interface Generated.SecretOrBuilder
        Returns:
        Whether the immutable field is set.
      • getImmutable

        public boolean getImmutable()
         Immutable, if set to true, ensures that data stored in the Secret cannot
         be updated (only object metadata can be modified).
         If not set to true, the field can be modified at any time.
         Defaulted to nil.
         +optional
         
        optional bool immutable = 5;
        Specified by:
        getImmutable in interface Generated.SecretOrBuilder
        Returns:
        The immutable.
      • setImmutable

        public Generated.Secret.Builder setImmutable​(boolean value)
         Immutable, if set to true, ensures that data stored in the Secret cannot
         be updated (only object metadata can be modified).
         If not set to true, the field can be modified at any time.
         Defaulted to nil.
         +optional
         
        optional bool immutable = 5;
        Parameters:
        value - The immutable to set.
        Returns:
        This builder for chaining.
      • clearImmutable

        public Generated.Secret.Builder clearImmutable()
         Immutable, if set to true, ensures that data stored in the Secret cannot
         be updated (only object metadata can be modified).
         If not set to true, the field can be modified at any time.
         Defaulted to nil.
         +optional
         
        optional bool immutable = 5;
        Returns:
        This builder for chaining.
      • getDataCount

        public int getDataCount()
        Description copied from interface: Generated.SecretOrBuilder
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
        Specified by:
        getDataCount in interface Generated.SecretOrBuilder
      • containsData

        public boolean containsData​(String key)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
        Specified by:
        containsData in interface Generated.SecretOrBuilder
      • getDataMap

        public Map<String,​com.google.protobuf.ByteString> getDataMap()
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
        Specified by:
        getDataMap in interface Generated.SecretOrBuilder
      • getDataOrDefault

        public com.google.protobuf.ByteString getDataOrDefault​(String key,
                                                               com.google.protobuf.ByteString defaultValue)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
        Specified by:
        getDataOrDefault in interface Generated.SecretOrBuilder
      • getDataOrThrow

        public com.google.protobuf.ByteString getDataOrThrow​(String key)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
        Specified by:
        getDataOrThrow in interface Generated.SecretOrBuilder
      • removeData

        public Generated.Secret.Builder removeData​(String key)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
      • getMutableData

        @Deprecated
        public Map<String,​com.google.protobuf.ByteString> getMutableData()
        Deprecated.
        Use alternate mutation accessors instead.
      • putData

        public Generated.Secret.Builder putData​(String key,
                                                com.google.protobuf.ByteString value)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
      • putAllData

        public Generated.Secret.Builder putAllData​(Map<String,​com.google.protobuf.ByteString> values)
         Data contains the secret data. Each key must consist of alphanumeric
         characters, '-', '_' or '.'. The serialized form of the secret data is a
         base64 encoded string, representing the arbitrary (possibly non-string)
         data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
         +optional
         
        map<string, bytes> data = 2;
      • getStringDataCount

        public int getStringDataCount()
        Description copied from interface: Generated.SecretOrBuilder
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
        Specified by:
        getStringDataCount in interface Generated.SecretOrBuilder
      • containsStringData

        public boolean containsStringData​(String key)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
        Specified by:
        containsStringData in interface Generated.SecretOrBuilder
      • getStringDataMap

        public Map<String,​String> getStringDataMap()
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
        Specified by:
        getStringDataMap in interface Generated.SecretOrBuilder
      • getStringDataOrDefault

        public String getStringDataOrDefault​(String key,
                                             String defaultValue)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
        Specified by:
        getStringDataOrDefault in interface Generated.SecretOrBuilder
      • getStringDataOrThrow

        public String getStringDataOrThrow​(String key)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
        Specified by:
        getStringDataOrThrow in interface Generated.SecretOrBuilder
      • removeStringData

        public Generated.Secret.Builder removeStringData​(String key)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
      • getMutableStringData

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

        public Generated.Secret.Builder putStringData​(String key,
                                                      String value)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
      • putAllStringData

        public Generated.Secret.Builder putAllStringData​(Map<String,​String> values)
         stringData allows specifying non-binary secret data in string form.
         It is provided as a write-only input field for convenience.
         All keys and values are merged into the data field on write, overwriting any existing values.
         The stringData field is never output when reading from the API.
         +k8s:conversion-gen=false
         +optional
         
        map<string, string> stringData = 4;
      • hasType

        public boolean hasType()
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Specified by:
        hasType in interface Generated.SecretOrBuilder
        Returns:
        Whether the type field is set.
      • getType

        public String getType()
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Specified by:
        getType in interface Generated.SecretOrBuilder
        Returns:
        The type.
      • getTypeBytes

        public com.google.protobuf.ByteString getTypeBytes()
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Specified by:
        getTypeBytes in interface Generated.SecretOrBuilder
        Returns:
        The bytes for type.
      • setType

        public Generated.Secret.Builder setType​(String value)
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public Generated.Secret.Builder clearType()
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Returns:
        This builder for chaining.
      • setTypeBytes

        public Generated.Secret.Builder setTypeBytes​(com.google.protobuf.ByteString value)
         Used to facilitate programmatic handling of secret data.
         More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
         +optional
         
        optional string type = 3;
        Parameters:
        value - The bytes for type to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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