Class Generated.SecretVolumeSource.Builder

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

    public static final class Generated.SecretVolumeSource.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.SecretVolumeSource.Builder>
    implements Generated.SecretVolumeSourceOrBuilder
     Adapts a Secret into a volume.
    
     The contents of the target Secret's Data field will be presented in a volume
     as files using the keys in the Data field as the file names.
     Secret volumes support ownership management and SELinux relabeling.
     
    Protobuf type k8s.io.api.core.v1.SecretVolumeSource
    • 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<Generated.SecretVolumeSource.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.SecretVolumeSource.Builder>
      • getDefaultInstanceForType

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

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

        public Generated.SecretVolumeSource buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.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.SecretVolumeSource.Builder>
      • mergeFrom

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

        public boolean hasSecretName()
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Specified by:
        hasSecretName in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        Whether the secretName field is set.
      • getSecretName

        public String getSecretName()
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Specified by:
        getSecretName in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        The secretName.
      • getSecretNameBytes

        public com.google.protobuf.ByteString getSecretNameBytes()
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Specified by:
        getSecretNameBytes in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        The bytes for secretName.
      • setSecretName

        public Generated.SecretVolumeSource.Builder setSecretName​(String value)
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Parameters:
        value - The secretName to set.
        Returns:
        This builder for chaining.
      • clearSecretName

        public Generated.SecretVolumeSource.Builder clearSecretName()
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Returns:
        This builder for chaining.
      • setSecretNameBytes

        public Generated.SecretVolumeSource.Builder setSecretNameBytes​(com.google.protobuf.ByteString value)
         secretName is the name of the secret in the pod's namespace to use.
         More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
         +optional
         
        optional string secretName = 1;
        Parameters:
        value - The bytes for secretName to set.
        Returns:
        This builder for chaining.
      • getItemsList

        public List<Generated.KeyToPath> getItemsList()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
        Specified by:
        getItemsList in interface Generated.SecretVolumeSourceOrBuilder
      • getItemsCount

        public int getItemsCount()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
        Specified by:
        getItemsCount in interface Generated.SecretVolumeSourceOrBuilder
      • getItems

        public Generated.KeyToPath getItems​(int index)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
        Specified by:
        getItems in interface Generated.SecretVolumeSourceOrBuilder
      • setItems

        public Generated.SecretVolumeSource.Builder setItems​(int index,
                                                             Generated.KeyToPath value)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • setItems

        public Generated.SecretVolumeSource.Builder setItems​(int index,
                                                             Generated.KeyToPath.Builder builderForValue)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addItems

        public Generated.SecretVolumeSource.Builder addItems​(Generated.KeyToPath value)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addItems

        public Generated.SecretVolumeSource.Builder addItems​(int index,
                                                             Generated.KeyToPath value)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addItems

        public Generated.SecretVolumeSource.Builder addItems​(Generated.KeyToPath.Builder builderForValue)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addItems

        public Generated.SecretVolumeSource.Builder addItems​(int index,
                                                             Generated.KeyToPath.Builder builderForValue)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addAllItems

        public Generated.SecretVolumeSource.Builder addAllItems​(Iterable<? extends Generated.KeyToPath> values)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • clearItems

        public Generated.SecretVolumeSource.Builder clearItems()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • removeItems

        public Generated.SecretVolumeSource.Builder removeItems​(int index)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • getItemsBuilder

        public Generated.KeyToPath.Builder getItemsBuilder​(int index)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • getItemsOrBuilder

        public Generated.KeyToPathOrBuilder getItemsOrBuilder​(int index)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
        Specified by:
        getItemsOrBuilder in interface Generated.SecretVolumeSourceOrBuilder
      • getItemsOrBuilderList

        public List<? extends Generated.KeyToPathOrBuilder> getItemsOrBuilderList()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
        Specified by:
        getItemsOrBuilderList in interface Generated.SecretVolumeSourceOrBuilder
      • addItemsBuilder

        public Generated.KeyToPath.Builder addItemsBuilder()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • addItemsBuilder

        public Generated.KeyToPath.Builder addItemsBuilder​(int index)
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • getItemsBuilderList

        public List<Generated.KeyToPath.Builder> getItemsBuilderList()
         items If unspecified, each key-value pair in the Data field of the referenced
         Secret will be projected into the volume as a file whose name is the
         key and content is the value. If specified, the listed keys will be
         projected into the specified paths, and unlisted keys will not be
         present. If a key is specified which is not present in the Secret,
         the volume setup will error unless it is marked optional. Paths must be
         relative and may not contain the '..' path or start with '..'.
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.core.v1.KeyToPath items = 2;
      • hasDefaultMode

        public boolean hasDefaultMode()
         defaultMode is Optional: mode bits used to set permissions on created files by default.
         Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
         YAML accepts both octal and decimal values, JSON requires decimal values
         for mode bits. Defaults to 0644.
         Directories within the path are not affected by this setting.
         This might be in conflict with other options that affect the file
         mode, like fsGroup, and the result can be other mode bits set.
         +optional
         
        optional int32 defaultMode = 3;
        Specified by:
        hasDefaultMode in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        Whether the defaultMode field is set.
      • getDefaultMode

        public int getDefaultMode()
         defaultMode is Optional: mode bits used to set permissions on created files by default.
         Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
         YAML accepts both octal and decimal values, JSON requires decimal values
         for mode bits. Defaults to 0644.
         Directories within the path are not affected by this setting.
         This might be in conflict with other options that affect the file
         mode, like fsGroup, and the result can be other mode bits set.
         +optional
         
        optional int32 defaultMode = 3;
        Specified by:
        getDefaultMode in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        The defaultMode.
      • setDefaultMode

        public Generated.SecretVolumeSource.Builder setDefaultMode​(int value)
         defaultMode is Optional: mode bits used to set permissions on created files by default.
         Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
         YAML accepts both octal and decimal values, JSON requires decimal values
         for mode bits. Defaults to 0644.
         Directories within the path are not affected by this setting.
         This might be in conflict with other options that affect the file
         mode, like fsGroup, and the result can be other mode bits set.
         +optional
         
        optional int32 defaultMode = 3;
        Parameters:
        value - The defaultMode to set.
        Returns:
        This builder for chaining.
      • clearDefaultMode

        public Generated.SecretVolumeSource.Builder clearDefaultMode()
         defaultMode is Optional: mode bits used to set permissions on created files by default.
         Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
         YAML accepts both octal and decimal values, JSON requires decimal values
         for mode bits. Defaults to 0644.
         Directories within the path are not affected by this setting.
         This might be in conflict with other options that affect the file
         mode, like fsGroup, and the result can be other mode bits set.
         +optional
         
        optional int32 defaultMode = 3;
        Returns:
        This builder for chaining.
      • hasOptional

        public boolean hasOptional()
         optional field specify whether the Secret or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Specified by:
        hasOptional in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        Whether the optional field is set.
      • getOptional

        public boolean getOptional()
         optional field specify whether the Secret or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Specified by:
        getOptional in interface Generated.SecretVolumeSourceOrBuilder
        Returns:
        The optional.
      • setOptional

        public Generated.SecretVolumeSource.Builder setOptional​(boolean value)
         optional field specify whether the Secret or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Parameters:
        value - The optional to set.
        Returns:
        This builder for chaining.
      • clearOptional

        public Generated.SecretVolumeSource.Builder clearOptional()
         optional field specify whether the Secret or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Returns:
        This builder for chaining.