Class 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.GeneratedMessageV3.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 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<DiskInstantiationConfig.Builder>
      • clear

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

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

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