Class LocalDiskInitializeParams.Builder

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

    public static final class LocalDiskInitializeParams.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<LocalDiskInitializeParams.Builder>
    implements LocalDiskInitializeParamsOrBuilder
     Input only. Specifies the parameters for a new disk that will be created
     alongside the new instance. Use initialization parameters to create boot
     disks or local SSDs attached to the new runtime.
     This property is mutually exclusive with the source property; you can only
     define one or the other, but not both.
     
    Protobuf type google.cloud.notebooks.v1.LocalDiskInitializeParams
    • 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<LocalDiskInitializeParams.Builder>
      • internalGetMutableMapField

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

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

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

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

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

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

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

        public LocalDiskInitializeParams.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<LocalDiskInitializeParams.Builder>
        Throws:
        IOException
      • getDescription

        public String getDescription()
         Optional. Provide this property when creating the disk.
         
        string description = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. Provide this property when creating the disk.
         
        string description = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public LocalDiskInitializeParams.Builder setDescription​(String value)
         Optional. Provide this property when creating the disk.
         
        string description = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public LocalDiskInitializeParams.Builder clearDescription()
         Optional. Provide this property when creating the disk.
         
        string description = 1 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public LocalDiskInitializeParams.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Optional. Provide this property when creating the disk.
         
        string description = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getDiskName

        public String getDiskName()
         Optional. Specifies the disk name. If not specified, the default is to use the name
         of the instance. If the disk with the instance name exists already in the
         given zone/region, a new name will be automatically generated.
         
        string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskName in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The diskName.
      • getDiskNameBytes

        public com.google.protobuf.ByteString getDiskNameBytes()
         Optional. Specifies the disk name. If not specified, the default is to use the name
         of the instance. If the disk with the instance name exists already in the
         given zone/region, a new name will be automatically generated.
         
        string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskNameBytes in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The bytes for diskName.
      • setDiskName

        public LocalDiskInitializeParams.Builder setDiskName​(String value)
         Optional. Specifies the disk name. If not specified, the default is to use the name
         of the instance. If the disk with the instance name exists already in the
         given zone/region, a new name will be automatically generated.
         
        string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The diskName to set.
        Returns:
        This builder for chaining.
      • clearDiskName

        public LocalDiskInitializeParams.Builder clearDiskName()
         Optional. Specifies the disk name. If not specified, the default is to use the name
         of the instance. If the disk with the instance name exists already in the
         given zone/region, a new name will be automatically generated.
         
        string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDiskNameBytes

        public LocalDiskInitializeParams.Builder setDiskNameBytes​(com.google.protobuf.ByteString value)
         Optional. Specifies the disk name. If not specified, the default is to use the name
         of the instance. If the disk with the instance name exists already in the
         given zone/region, a new name will be automatically generated.
         
        string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for diskName to set.
        Returns:
        This builder for chaining.
      • getDiskSizeGb

        public long getDiskSizeGb()
         Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
         will be the same size as the image (usually 10GB). If specified, the size
         must be equal to or larger than 10GB. Default 100 GB.
         
        int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskSizeGb in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The diskSizeGb.
      • setDiskSizeGb

        public LocalDiskInitializeParams.Builder setDiskSizeGb​(long value)
         Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
         will be the same size as the image (usually 10GB). If specified, the size
         must be equal to or larger than 10GB. Default 100 GB.
         
        int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The diskSizeGb to set.
        Returns:
        This builder for chaining.
      • clearDiskSizeGb

        public LocalDiskInitializeParams.Builder clearDiskSizeGb()
         Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
         will be the same size as the image (usually 10GB). If specified, the size
         must be equal to or larger than 10GB. Default 100 GB.
         
        int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getDiskTypeValue

        public int getDiskTypeValue()
         Input only. The type of the boot disk attached to this instance, defaults to
         standard persistent disk (`PD_STANDARD`).
         
        .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
        Specified by:
        getDiskTypeValue in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The enum numeric value on the wire for diskType.
      • setDiskTypeValue

        public LocalDiskInitializeParams.Builder setDiskTypeValue​(int value)
         Input only. The type of the boot disk attached to this instance, defaults to
         standard persistent disk (`PD_STANDARD`).
         
        .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for diskType to set.
        Returns:
        This builder for chaining.
      • getDiskType

        public LocalDiskInitializeParams.DiskType getDiskType()
         Input only. The type of the boot disk attached to this instance, defaults to
         standard persistent disk (`PD_STANDARD`).
         
        .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
        Specified by:
        getDiskType in interface LocalDiskInitializeParamsOrBuilder
        Returns:
        The diskType.
      • setDiskType

        public LocalDiskInitializeParams.Builder setDiskType​(LocalDiskInitializeParams.DiskType value)
         Input only. The type of the boot disk attached to this instance, defaults to
         standard persistent disk (`PD_STANDARD`).
         
        .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
        Parameters:
        value - The diskType to set.
        Returns:
        This builder for chaining.
      • clearDiskType

        public LocalDiskInitializeParams.Builder clearDiskType()
         Input only. The type of the boot disk attached to this instance, defaults to
         standard persistent disk (`PD_STANDARD`).
         
        .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY];
        Returns:
        This builder for chaining.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: LocalDiskInitializeParamsOrBuilder
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface LocalDiskInitializeParamsOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface LocalDiskInitializeParamsOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface LocalDiskInitializeParamsOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface LocalDiskInitializeParamsOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface LocalDiskInitializeParamsOrBuilder
      • removeLabels

        public LocalDiskInitializeParams.Builder removeLabels​(String key)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableLabels

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

        public LocalDiskInitializeParams.Builder putLabels​(String key,
                                                           String value)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public LocalDiskInitializeParams.Builder putAllLabels​(Map<String,​String> values)
         Optional. Labels to apply to this disk. These can be later modified by the
         disks.setLabels method. This field is only applicable for persistent disks.
         
        map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

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

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