Class AllocationPolicy.InstancePolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy
All Implemented Interfaces:
AllocationPolicy.InstancePolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
AllocationPolicy

public static final class AllocationPolicy.InstancePolicy extends com.google.protobuf.GeneratedMessage implements AllocationPolicy.InstancePolicyOrBuilder
 InstancePolicy describes an instance type and resources attached to each VM
 created by this InstancePolicy.
 
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy
See Also:
  • Field Details

    • ALLOWED_MACHINE_TYPES_FIELD_NUMBER

      public static final int ALLOWED_MACHINE_TYPES_FIELD_NUMBER
      See Also:
    • MACHINE_TYPE_FIELD_NUMBER

      public static final int MACHINE_TYPE_FIELD_NUMBER
      See Also:
    • MIN_CPU_PLATFORM_FIELD_NUMBER

      public static final int MIN_CPU_PLATFORM_FIELD_NUMBER
      See Also:
    • PROVISIONING_MODEL_FIELD_NUMBER

      public static final int PROVISIONING_MODEL_FIELD_NUMBER
      See Also:
    • ACCELERATORS_FIELD_NUMBER

      public static final int ACCELERATORS_FIELD_NUMBER
      See Also:
    • BOOT_DISK_FIELD_NUMBER

      public static final int BOOT_DISK_FIELD_NUMBER
      See Also:
    • DISKS_FIELD_NUMBER

      public static final int DISKS_FIELD_NUMBER
      See Also:
    • RESERVATION_FIELD_NUMBER

      public static final int RESERVATION_FIELD_NUMBER
      See Also:
  • 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
    • getAllowedMachineTypesList

      @Deprecated public com.google.protobuf.ProtocolStringList getAllowedMachineTypesList()
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy.allowed_machine_types is deprecated. See google/cloud/batch/v1alpha/job.proto;l=466
       Deprecated: please use machine_type instead.
       
      repeated string allowed_machine_types = 1 [deprecated = true];
      Specified by:
      getAllowedMachineTypesList in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      A list containing the allowedMachineTypes.
    • getAllowedMachineTypesCount

      @Deprecated public int getAllowedMachineTypesCount()
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy.allowed_machine_types is deprecated. See google/cloud/batch/v1alpha/job.proto;l=466
       Deprecated: please use machine_type instead.
       
      repeated string allowed_machine_types = 1 [deprecated = true];
      Specified by:
      getAllowedMachineTypesCount in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The count of allowedMachineTypes.
    • getAllowedMachineTypes

      @Deprecated public String getAllowedMachineTypes(int index)
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy.allowed_machine_types is deprecated. See google/cloud/batch/v1alpha/job.proto;l=466
       Deprecated: please use machine_type instead.
       
      repeated string allowed_machine_types = 1 [deprecated = true];
      Specified by:
      getAllowedMachineTypes in interface AllocationPolicy.InstancePolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedMachineTypes at the given index.
    • getAllowedMachineTypesBytes

      @Deprecated public com.google.protobuf.ByteString getAllowedMachineTypesBytes(int index)
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy.allowed_machine_types is deprecated. See google/cloud/batch/v1alpha/job.proto;l=466
       Deprecated: please use machine_type instead.
       
      repeated string allowed_machine_types = 1 [deprecated = true];
      Specified by:
      getAllowedMachineTypesBytes in interface AllocationPolicy.InstancePolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedMachineTypes at the given index.
    • getMachineType

      public String getMachineType()
       The Compute Engine machine type.
       
      string machine_type = 2;
      Specified by:
      getMachineType in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The machineType.
    • getMachineTypeBytes

      public com.google.protobuf.ByteString getMachineTypeBytes()
       The Compute Engine machine type.
       
      string machine_type = 2;
      Specified by:
      getMachineTypeBytes in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The bytes for machineType.
    • getMinCpuPlatform

      public String getMinCpuPlatform()
       The minimum CPU platform.
       See
       https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
       
      string min_cpu_platform = 3;
      Specified by:
      getMinCpuPlatform in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The minCpuPlatform.
    • getMinCpuPlatformBytes

      public com.google.protobuf.ByteString getMinCpuPlatformBytes()
       The minimum CPU platform.
       See
       https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
       
      string min_cpu_platform = 3;
      Specified by:
      getMinCpuPlatformBytes in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The bytes for minCpuPlatform.
    • getProvisioningModelValue

      public int getProvisioningModelValue()
       The provisioning model.
       
      .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_model = 4;
      Specified by:
      getProvisioningModelValue in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The enum numeric value on the wire for provisioningModel.
    • getProvisioningModel

      public AllocationPolicy.ProvisioningModel getProvisioningModel()
       The provisioning model.
       
      .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_model = 4;
      Specified by:
      getProvisioningModel in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The provisioningModel.
    • getAcceleratorsList

      public List<AllocationPolicy.Accelerator> getAcceleratorsList()
       The accelerators attached to each VM instance.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.Accelerator accelerators = 5;
      Specified by:
      getAcceleratorsList in interface AllocationPolicy.InstancePolicyOrBuilder
    • getAcceleratorsOrBuilderList

      public List<? extends AllocationPolicy.AcceleratorOrBuilder> getAcceleratorsOrBuilderList()
       The accelerators attached to each VM instance.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.Accelerator accelerators = 5;
      Specified by:
      getAcceleratorsOrBuilderList in interface AllocationPolicy.InstancePolicyOrBuilder
    • getAcceleratorsCount

      public int getAcceleratorsCount()
       The accelerators attached to each VM instance.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.Accelerator accelerators = 5;
      Specified by:
      getAcceleratorsCount in interface AllocationPolicy.InstancePolicyOrBuilder
    • getAccelerators

      public AllocationPolicy.Accelerator getAccelerators(int index)
       The accelerators attached to each VM instance.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.Accelerator accelerators = 5;
      Specified by:
      getAccelerators in interface AllocationPolicy.InstancePolicyOrBuilder
    • getAcceleratorsOrBuilder

      public AllocationPolicy.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index)
       The accelerators attached to each VM instance.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.Accelerator accelerators = 5;
      Specified by:
      getAcceleratorsOrBuilder in interface AllocationPolicy.InstancePolicyOrBuilder
    • hasBootDisk

      public boolean hasBootDisk()
       Boot disk to be created and attached to each VM by this InstancePolicy.
       Boot disk will be deleted when the VM is deleted.
       Batch API now only supports booting from image.
       
      .google.cloud.batch.v1alpha.AllocationPolicy.Disk boot_disk = 8;
      Specified by:
      hasBootDisk in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      Whether the bootDisk field is set.
    • getBootDisk

      public AllocationPolicy.Disk getBootDisk()
       Boot disk to be created and attached to each VM by this InstancePolicy.
       Boot disk will be deleted when the VM is deleted.
       Batch API now only supports booting from image.
       
      .google.cloud.batch.v1alpha.AllocationPolicy.Disk boot_disk = 8;
      Specified by:
      getBootDisk in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The bootDisk.
    • getBootDiskOrBuilder

      public AllocationPolicy.DiskOrBuilder getBootDiskOrBuilder()
       Boot disk to be created and attached to each VM by this InstancePolicy.
       Boot disk will be deleted when the VM is deleted.
       Batch API now only supports booting from image.
       
      .google.cloud.batch.v1alpha.AllocationPolicy.Disk boot_disk = 8;
      Specified by:
      getBootDiskOrBuilder in interface AllocationPolicy.InstancePolicyOrBuilder
    • getDisksList

      public List<AllocationPolicy.AttachedDisk> getDisksList()
       Non-boot disks to be attached for each VM created by this InstancePolicy.
       New disks will be deleted when the VM is deleted.
       A non-boot disk is a disk that can be of a device with a
       file system or a raw storage drive that is not ready for data
       storage and accessing.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk disks = 6;
      Specified by:
      getDisksList in interface AllocationPolicy.InstancePolicyOrBuilder
    • getDisksOrBuilderList

      public List<? extends AllocationPolicy.AttachedDiskOrBuilder> getDisksOrBuilderList()
       Non-boot disks to be attached for each VM created by this InstancePolicy.
       New disks will be deleted when the VM is deleted.
       A non-boot disk is a disk that can be of a device with a
       file system or a raw storage drive that is not ready for data
       storage and accessing.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk disks = 6;
      Specified by:
      getDisksOrBuilderList in interface AllocationPolicy.InstancePolicyOrBuilder
    • getDisksCount

      public int getDisksCount()
       Non-boot disks to be attached for each VM created by this InstancePolicy.
       New disks will be deleted when the VM is deleted.
       A non-boot disk is a disk that can be of a device with a
       file system or a raw storage drive that is not ready for data
       storage and accessing.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk disks = 6;
      Specified by:
      getDisksCount in interface AllocationPolicy.InstancePolicyOrBuilder
    • getDisks

      public AllocationPolicy.AttachedDisk getDisks(int index)
       Non-boot disks to be attached for each VM created by this InstancePolicy.
       New disks will be deleted when the VM is deleted.
       A non-boot disk is a disk that can be of a device with a
       file system or a raw storage drive that is not ready for data
       storage and accessing.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk disks = 6;
      Specified by:
      getDisks in interface AllocationPolicy.InstancePolicyOrBuilder
    • getDisksOrBuilder

      public AllocationPolicy.AttachedDiskOrBuilder getDisksOrBuilder(int index)
       Non-boot disks to be attached for each VM created by this InstancePolicy.
       New disks will be deleted when the VM is deleted.
       A non-boot disk is a disk that can be of a device with a
       file system or a raw storage drive that is not ready for data
       storage and accessing.
       
      repeated .google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk disks = 6;
      Specified by:
      getDisksOrBuilder in interface AllocationPolicy.InstancePolicyOrBuilder
    • getReservation

      public String getReservation()
       Optional. If not specified (default), VMs will consume any applicable
       reservation. If "NO_RESERVATION" is specified, VMs will not consume any
       reservation. Otherwise, if specified, VMs will consume only the specified
       reservation.
       
      string reservation = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getReservation in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The reservation.
    • getReservationBytes

      public com.google.protobuf.ByteString getReservationBytes()
       Optional. If not specified (default), VMs will consume any applicable
       reservation. If "NO_RESERVATION" is specified, VMs will not consume any
       reservation. Otherwise, if specified, VMs will consume only the specified
       reservation.
       
      string reservation = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getReservationBytes in interface AllocationPolicy.InstancePolicyOrBuilder
      Returns:
      The bytes for reservation.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AllocationPolicy.InstancePolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AllocationPolicy.InstancePolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AllocationPolicy.InstancePolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AllocationPolicy.InstancePolicy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AllocationPolicy.InstancePolicy.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AllocationPolicy.InstancePolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AllocationPolicy.InstancePolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AllocationPolicy.InstancePolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<AllocationPolicy.InstancePolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AllocationPolicy.InstancePolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder