Class DataDisk.Builder

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

    public static final class DataDisk.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DataDisk.Builder>
    implements DataDiskOrBuilder
     An instance-attached disk resource.
     
    Protobuf type google.cloud.notebooks.v2.DataDisk
    • 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<DataDisk.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public DataDisk.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<DataDisk.Builder>
        Throws:
        IOException
      • getDiskSizeGb

        public long getDiskSizeGb()
         Optional. The size of the disk in GB attached to this VM instance, up to a
         maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
         
        int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskSizeGb in interface DataDiskOrBuilder
        Returns:
        The diskSizeGb.
      • setDiskSizeGb

        public DataDisk.Builder setDiskSizeGb​(long value)
         Optional. The size of the disk in GB attached to this VM instance, up to a
         maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
         
        int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The diskSizeGb to set.
        Returns:
        This builder for chaining.
      • clearDiskSizeGb

        public DataDisk.Builder clearDiskSizeGb()
         Optional. The size of the disk in GB attached to this VM instance, up to a
         maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
         
        int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getDiskTypeValue

        public int getDiskTypeValue()
         Optional. Input only. Indicates the type of the disk.
         
        .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskTypeValue in interface DataDiskOrBuilder
        Returns:
        The enum numeric value on the wire for diskType.
      • setDiskTypeValue

        public DataDisk.Builder setDiskTypeValue​(int value)
         Optional. Input only. Indicates the type of the disk.
         
        .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for diskType to set.
        Returns:
        This builder for chaining.
      • getDiskType

        public DiskType getDiskType()
         Optional. Input only. Indicates the type of the disk.
         
        .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskType in interface DataDiskOrBuilder
        Returns:
        The diskType.
      • setDiskType

        public DataDisk.Builder setDiskType​(DiskType value)
         Optional. Input only. Indicates the type of the disk.
         
        .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The diskType to set.
        Returns:
        This builder for chaining.
      • clearDiskType

        public DataDisk.Builder clearDiskType()
         Optional. Input only. Indicates the type of the disk.
         
        .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getDiskEncryptionValue

        public int getDiskEncryptionValue()
         Optional. Input only. Disk encryption method used on the boot and data
         disks, defaults to GMEK.
         
        .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskEncryptionValue in interface DataDiskOrBuilder
        Returns:
        The enum numeric value on the wire for diskEncryption.
      • setDiskEncryptionValue

        public DataDisk.Builder setDiskEncryptionValue​(int value)
         Optional. Input only. Disk encryption method used on the boot and data
         disks, defaults to GMEK.
         
        .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for diskEncryption to set.
        Returns:
        This builder for chaining.
      • getDiskEncryption

        public DiskEncryption getDiskEncryption()
         Optional. Input only. Disk encryption method used on the boot and data
         disks, defaults to GMEK.
         
        .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDiskEncryption in interface DataDiskOrBuilder
        Returns:
        The diskEncryption.
      • setDiskEncryption

        public DataDisk.Builder setDiskEncryption​(DiskEncryption value)
         Optional. Input only. Disk encryption method used on the boot and data
         disks, defaults to GMEK.
         
        .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The diskEncryption to set.
        Returns:
        This builder for chaining.
      • clearDiskEncryption

        public DataDisk.Builder clearDiskEncryption()
         Optional. Input only. Disk encryption method used on the boot and data
         disks, defaults to GMEK.
         
        .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getKmsKey

        public String getKmsKey()
         Optional. Input only. The KMS key used to encrypt the disks, only
         applicable if disk_encryption is CMEK. Format:
         `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
        
         Learn more about using your own encryption keys.
         
        string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getKmsKey in interface DataDiskOrBuilder
        Returns:
        The kmsKey.
      • getKmsKeyBytes

        public com.google.protobuf.ByteString getKmsKeyBytes()
         Optional. Input only. The KMS key used to encrypt the disks, only
         applicable if disk_encryption is CMEK. Format:
         `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
        
         Learn more about using your own encryption keys.
         
        string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getKmsKeyBytes in interface DataDiskOrBuilder
        Returns:
        The bytes for kmsKey.
      • setKmsKey

        public DataDisk.Builder setKmsKey​(String value)
         Optional. Input only. The KMS key used to encrypt the disks, only
         applicable if disk_encryption is CMEK. Format:
         `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
        
         Learn more about using your own encryption keys.
         
        string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The kmsKey to set.
        Returns:
        This builder for chaining.
      • clearKmsKey

        public DataDisk.Builder clearKmsKey()
         Optional. Input only. The KMS key used to encrypt the disks, only
         applicable if disk_encryption is CMEK. Format:
         `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
        
         Learn more about using your own encryption keys.
         
        string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setKmsKeyBytes

        public DataDisk.Builder setKmsKeyBytes​(com.google.protobuf.ByteString value)
         Optional. Input only. The KMS key used to encrypt the disks, only
         applicable if disk_encryption is CMEK. Format:
         `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
        
         Learn more about using your own encryption keys.
         
        string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for kmsKey to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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