Class DiskInstantiationConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DiskInstantiationConfig.Builder>
com.google.cloud.compute.v1.DiskInstantiationConfig.Builder
All Implemented Interfaces:
DiskInstantiationConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DiskInstantiationConfig

public static final class DiskInstantiationConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<DiskInstantiationConfig.Builder> implements DiskInstantiationConfigOrBuilder
 A specification of the desired way to instantiate a disk in the instance
 template when its created from a source instance.
 
Protobuf type google.cloud.compute.v1.DiskInstantiationConfig
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

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

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

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

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

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

    • isInitialized

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

      public DiskInstantiationConfig.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<DiskInstantiationConfig.Builder>
      Throws:
      IOException
    • hasAutoDelete

      public boolean hasAutoDelete()
       Specifies whether the disk will be auto-deleted when the instance is
       deleted (but not when the disk is detached from the instance).
       
      optional bool auto_delete = 464761403;
      Specified by:
      hasAutoDelete in interface DiskInstantiationConfigOrBuilder
      Returns:
      Whether the autoDelete field is set.
    • getAutoDelete

      public boolean getAutoDelete()
       Specifies whether the disk will be auto-deleted when the instance is
       deleted (but not when the disk is detached from the instance).
       
      optional bool auto_delete = 464761403;
      Specified by:
      getAutoDelete in interface DiskInstantiationConfigOrBuilder
      Returns:
      The autoDelete.
    • setAutoDelete

      public DiskInstantiationConfig.Builder setAutoDelete(boolean value)
       Specifies whether the disk will be auto-deleted when the instance is
       deleted (but not when the disk is detached from the instance).
       
      optional bool auto_delete = 464761403;
      Parameters:
      value - The autoDelete to set.
      Returns:
      This builder for chaining.
    • clearAutoDelete

      public DiskInstantiationConfig.Builder clearAutoDelete()
       Specifies whether the disk will be auto-deleted when the instance is
       deleted (but not when the disk is detached from the instance).
       
      optional bool auto_delete = 464761403;
      Returns:
      This builder for chaining.
    • hasCustomImage

      public boolean hasCustomImage()
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Specified by:
      hasCustomImage in interface DiskInstantiationConfigOrBuilder
      Returns:
      Whether the customImage field is set.
    • getCustomImage

      public String getCustomImage()
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Specified by:
      getCustomImage in interface DiskInstantiationConfigOrBuilder
      Returns:
      The customImage.
    • getCustomImageBytes

      public com.google.protobuf.ByteString getCustomImageBytes()
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Specified by:
      getCustomImageBytes in interface DiskInstantiationConfigOrBuilder
      Returns:
      The bytes for customImage.
    • setCustomImage

      public DiskInstantiationConfig.Builder setCustomImage(String value)
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Parameters:
      value - The customImage to set.
      Returns:
      This builder for chaining.
    • clearCustomImage

      public DiskInstantiationConfig.Builder clearCustomImage()
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Returns:
      This builder for chaining.
    • setCustomImageBytes

      public DiskInstantiationConfig.Builder setCustomImageBytes(com.google.protobuf.ByteString value)
       The custom source image to be used to restore this disk when instantiating
       this instance template.
       
      optional string custom_image = 184123149;
      Parameters:
      value - The bytes for customImage to set.
      Returns:
      This builder for chaining.
    • hasDeviceName

      public boolean hasDeviceName()
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Specified by:
      hasDeviceName in interface DiskInstantiationConfigOrBuilder
      Returns:
      Whether the deviceName field is set.
    • getDeviceName

      public String getDeviceName()
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Specified by:
      getDeviceName in interface DiskInstantiationConfigOrBuilder
      Returns:
      The deviceName.
    • getDeviceNameBytes

      public com.google.protobuf.ByteString getDeviceNameBytes()
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Specified by:
      getDeviceNameBytes in interface DiskInstantiationConfigOrBuilder
      Returns:
      The bytes for deviceName.
    • setDeviceName

      public DiskInstantiationConfig.Builder setDeviceName(String value)
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Parameters:
      value - The deviceName to set.
      Returns:
      This builder for chaining.
    • clearDeviceName

      public DiskInstantiationConfig.Builder clearDeviceName()
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Returns:
      This builder for chaining.
    • setDeviceNameBytes

      public DiskInstantiationConfig.Builder setDeviceNameBytes(com.google.protobuf.ByteString value)
       Specifies the device name of the disk to which the configurations apply to.
       
      optional string device_name = 67541716;
      Parameters:
      value - The bytes for deviceName to set.
      Returns:
      This builder for chaining.
    • hasInstantiateFrom

      public boolean hasInstantiateFrom()
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Specified by:
      hasInstantiateFrom in interface DiskInstantiationConfigOrBuilder
      Returns:
      Whether the instantiateFrom field is set.
    • getInstantiateFrom

      public String getInstantiateFrom()
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Specified by:
      getInstantiateFrom in interface DiskInstantiationConfigOrBuilder
      Returns:
      The instantiateFrom.
    • getInstantiateFromBytes

      public com.google.protobuf.ByteString getInstantiateFromBytes()
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Specified by:
      getInstantiateFromBytes in interface DiskInstantiationConfigOrBuilder
      Returns:
      The bytes for instantiateFrom.
    • setInstantiateFrom

      public DiskInstantiationConfig.Builder setInstantiateFrom(String value)
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Parameters:
      value - The instantiateFrom to set.
      Returns:
      This builder for chaining.
    • clearInstantiateFrom

      public DiskInstantiationConfig.Builder clearInstantiateFrom()
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Returns:
      This builder for chaining.
    • setInstantiateFromBytes

      public DiskInstantiationConfig.Builder setInstantiateFromBytes(com.google.protobuf.ByteString value)
       Specifies whether to include the disk and what image to use. Possible
       values are:
      
      
       - source-image: to use the same image that was used to
       create the source instance's corresponding disk. Applicable to the boot
       disk and additional read-write disks.
       - source-image-family: to use the same image family that
       was used to create the source instance's corresponding disk. Applicable
       to the boot disk and additional read-write disks.
       - custom-image: to use a user-provided image url for disk
       creation. Applicable to the boot disk and additional read-write
       disks.
       - attach-read-only: to attach a read-only
       disk. Applicable to read-only disks.
       - do-not-include: to exclude a disk from the template.
       Applicable to additional read-write disks, local SSDs, and read-only
       disks.
       Check the InstantiateFrom enum for the list of possible values.
       
      optional string instantiate_from = 393383903;
      Parameters:
      value - The bytes for instantiateFrom to set.
      Returns:
      This builder for chaining.