Class Disk.Builder

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

    public static final class Disk.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Disk.Builder>
    implements DiskOrBuilder
     Carries information about a disk that can be attached to a VM.
    
     See https://cloud.google.com/compute/docs/disks/performance for more
     information about disk type, size, and performance considerations.
    
     Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
     [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
     
    Protobuf type google.cloud.lifesciences.v2beta.Disk
    • 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<Disk.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public Disk.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<Disk.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         A user-supplied name for the disk. Used when mounting the disk into
         actions. The name must contain only upper and lowercase alphanumeric
         characters and hyphens and cannot start with a hyphen.
         
        string name = 1;
        Specified by:
        getName in interface DiskOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         A user-supplied name for the disk. Used when mounting the disk into
         actions. The name must contain only upper and lowercase alphanumeric
         characters and hyphens and cannot start with a hyphen.
         
        string name = 1;
        Specified by:
        getNameBytes in interface DiskOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Disk.Builder setName​(String value)
         A user-supplied name for the disk. Used when mounting the disk into
         actions. The name must contain only upper and lowercase alphanumeric
         characters and hyphens and cannot start with a hyphen.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Disk.Builder clearName()
         A user-supplied name for the disk. Used when mounting the disk into
         actions. The name must contain only upper and lowercase alphanumeric
         characters and hyphens and cannot start with a hyphen.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Disk.Builder setNameBytes​(com.google.protobuf.ByteString value)
         A user-supplied name for the disk. Used when mounting the disk into
         actions. The name must contain only upper and lowercase alphanumeric
         characters and hyphens and cannot start with a hyphen.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getSizeGb

        public int getSizeGb()
         The size, in GB, of the disk to attach. If the size is not
         specified, a default is chosen to ensure reasonable I/O performance.
        
         If the disk type is specified as `local-ssd`, multiple local drives are
         automatically combined to provide the requested size. Note, however, that
         each physical SSD is 375GB in size, and no more than 8 drives can be
         attached to a single instance.
         
        int32 size_gb = 2;
        Specified by:
        getSizeGb in interface DiskOrBuilder
        Returns:
        The sizeGb.
      • setSizeGb

        public Disk.Builder setSizeGb​(int value)
         The size, in GB, of the disk to attach. If the size is not
         specified, a default is chosen to ensure reasonable I/O performance.
        
         If the disk type is specified as `local-ssd`, multiple local drives are
         automatically combined to provide the requested size. Note, however, that
         each physical SSD is 375GB in size, and no more than 8 drives can be
         attached to a single instance.
         
        int32 size_gb = 2;
        Parameters:
        value - The sizeGb to set.
        Returns:
        This builder for chaining.
      • clearSizeGb

        public Disk.Builder clearSizeGb()
         The size, in GB, of the disk to attach. If the size is not
         specified, a default is chosen to ensure reasonable I/O performance.
        
         If the disk type is specified as `local-ssd`, multiple local drives are
         automatically combined to provide the requested size. Note, however, that
         each physical SSD is 375GB in size, and no more than 8 drives can be
         attached to a single instance.
         
        int32 size_gb = 2;
        Returns:
        This builder for chaining.
      • getType

        public String getType()
         The Compute Engine disk type. If unspecified, `pd-standard` is used.
         
        string type = 3;
        Specified by:
        getType in interface DiskOrBuilder
        Returns:
        The type.
      • getTypeBytes

        public com.google.protobuf.ByteString getTypeBytes()
         The Compute Engine disk type. If unspecified, `pd-standard` is used.
         
        string type = 3;
        Specified by:
        getTypeBytes in interface DiskOrBuilder
        Returns:
        The bytes for type.
      • setType

        public Disk.Builder setType​(String value)
         The Compute Engine disk type. If unspecified, `pd-standard` is used.
         
        string type = 3;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public Disk.Builder clearType()
         The Compute Engine disk type. If unspecified, `pd-standard` is used.
         
        string type = 3;
        Returns:
        This builder for chaining.
      • setTypeBytes

        public Disk.Builder setTypeBytes​(com.google.protobuf.ByteString value)
         The Compute Engine disk type. If unspecified, `pd-standard` is used.
         
        string type = 3;
        Parameters:
        value - The bytes for type to set.
        Returns:
        This builder for chaining.
      • getSourceImage

        public String getSourceImage()
         An optional image to put on the disk before attaching it to the VM.
         
        string source_image = 4;
        Specified by:
        getSourceImage in interface DiskOrBuilder
        Returns:
        The sourceImage.
      • getSourceImageBytes

        public com.google.protobuf.ByteString getSourceImageBytes()
         An optional image to put on the disk before attaching it to the VM.
         
        string source_image = 4;
        Specified by:
        getSourceImageBytes in interface DiskOrBuilder
        Returns:
        The bytes for sourceImage.
      • setSourceImage

        public Disk.Builder setSourceImage​(String value)
         An optional image to put on the disk before attaching it to the VM.
         
        string source_image = 4;
        Parameters:
        value - The sourceImage to set.
        Returns:
        This builder for chaining.
      • clearSourceImage

        public Disk.Builder clearSourceImage()
         An optional image to put on the disk before attaching it to the VM.
         
        string source_image = 4;
        Returns:
        This builder for chaining.
      • setSourceImageBytes

        public Disk.Builder setSourceImageBytes​(com.google.protobuf.ByteString value)
         An optional image to put on the disk before attaching it to the VM.
         
        string source_image = 4;
        Parameters:
        value - The bytes for sourceImage to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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