Class Generated.ConfigMapVolumeSource.Builder

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

    public static final class Generated.ConfigMapVolumeSource.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.ConfigMapVolumeSource.Builder>
    implements Generated.ConfigMapVolumeSourceOrBuilder
     Adapts a ConfigMap into a volume.
    
     The contents of the target ConfigMap's Data field will be presented in a
     volume as files using the keys in the Data field as the file names, unless
     the items element is populated with specific mappings of keys to paths.
     ConfigMap volumes support ownership management and SELinux relabeling.
     
    Protobuf type k8s.io.api.core.v1.ConfigMapVolumeSource
    • 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.ConfigMapVolumeSource.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.ConfigMapVolumeSource.Builder>
      • getDefaultInstanceForType

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

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

        public Generated.ConfigMapVolumeSource 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.ConfigMapVolumeSource.Builder>
      • getItemsList

        public List<Generated.KeyToPath> getItemsList()
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
      • getItemsCount

        public int getItemsCount()
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
      • getItems

        public Generated.KeyToPath getItems​(int index)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
      • setItems

        public Generated.ConfigMapVolumeSource.Builder setItems​(int index,
                                                                Generated.KeyToPath value)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder setItems​(int index,
                                                                Generated.KeyToPath.Builder builderForValue)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder addItems​(Generated.KeyToPath value)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder addItems​(int index,
                                                                Generated.KeyToPath value)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder addItems​(Generated.KeyToPath.Builder builderForValue)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder addItems​(int index,
                                                                Generated.KeyToPath.Builder builderForValue)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder addAllItems​(Iterable<? extends Generated.KeyToPath> values)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder clearItems()
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSource.Builder removeItems​(int index)
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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
         ConfigMap 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 ConfigMap,
         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
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
      • getItemsOrBuilderList

        public List<? extends Generated.KeyToPathOrBuilder> getItemsOrBuilderList()
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
      • addItemsBuilder

        public Generated.KeyToPath.Builder addItemsBuilder()
         items if unspecified, each key-value pair in the Data field of the referenced
         ConfigMap 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 ConfigMap,
         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
         ConfigMap 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 ConfigMap,
         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
         ConfigMap 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 ConfigMap,
         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.ConfigMapVolumeSourceOrBuilder
        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.ConfigMapVolumeSourceOrBuilder
        Returns:
        The defaultMode.
      • setDefaultMode

        public Generated.ConfigMapVolumeSource.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.ConfigMapVolumeSource.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 specify whether the ConfigMap or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Specified by:
        hasOptional in interface Generated.ConfigMapVolumeSourceOrBuilder
        Returns:
        Whether the optional field is set.
      • setOptional

        public Generated.ConfigMapVolumeSource.Builder setOptional​(boolean value)
         optional specify whether the ConfigMap 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.ConfigMapVolumeSource.Builder clearOptional()
         optional specify whether the ConfigMap or its keys must be defined
         +optional
         
        optional bool optional = 4;
        Returns:
        This builder for chaining.