Class ResourcePolicyGroupPlacementPolicy.Builder

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

public static final class ResourcePolicyGroupPlacementPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<ResourcePolicyGroupPlacementPolicy.Builder> implements ResourcePolicyGroupPlacementPolicyOrBuilder
 A GroupPlacementPolicy specifies resource placement configuration.
 It specifies the failure bucket separation
 
Protobuf type google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy
  • 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<ResourcePolicyGroupPlacementPolicy.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<ResourcePolicyGroupPlacementPolicy.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<ResourcePolicyGroupPlacementPolicy.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public ResourcePolicyGroupPlacementPolicy.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<ResourcePolicyGroupPlacementPolicy.Builder>
      Throws:
      IOException
    • hasAcceleratorTopologyMode

      public boolean hasAcceleratorTopologyMode()
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Specified by:
      hasAcceleratorTopologyMode in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      Whether the acceleratorTopologyMode field is set.
    • getAcceleratorTopologyMode

      public String getAcceleratorTopologyMode()
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Specified by:
      getAcceleratorTopologyMode in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The acceleratorTopologyMode.
    • getAcceleratorTopologyModeBytes

      public com.google.protobuf.ByteString getAcceleratorTopologyModeBytes()
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Specified by:
      getAcceleratorTopologyModeBytes in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The bytes for acceleratorTopologyMode.
    • setAcceleratorTopologyMode

      public ResourcePolicyGroupPlacementPolicy.Builder setAcceleratorTopologyMode(String value)
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Parameters:
      value - The acceleratorTopologyMode to set.
      Returns:
      This builder for chaining.
    • clearAcceleratorTopologyMode

      public ResourcePolicyGroupPlacementPolicy.Builder clearAcceleratorTopologyMode()
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Returns:
      This builder for chaining.
    • setAcceleratorTopologyModeBytes

      public ResourcePolicyGroupPlacementPolicy.Builder setAcceleratorTopologyModeBytes(com.google.protobuf.ByteString value)
       Specifies the connection mode for the accelerator topology. If not
       specified, the default is AUTO_CONNECT.
       Check the AcceleratorTopologyMode enum for the list of possible values.
       
      optional string accelerator_topology_mode = 284293791;
      Parameters:
      value - The bytes for acceleratorTopologyMode to set.
      Returns:
      This builder for chaining.
    • hasAvailabilityDomainCount

      public boolean hasAvailabilityDomainCount()
       The number of availability domains to spread instances across. If two
       instances are in different availability domain, they are not in the same
       low latency network.
       
      optional int32 availability_domain_count = 12453432;
      Specified by:
      hasAvailabilityDomainCount in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      Whether the availabilityDomainCount field is set.
    • getAvailabilityDomainCount

      public int getAvailabilityDomainCount()
       The number of availability domains to spread instances across. If two
       instances are in different availability domain, they are not in the same
       low latency network.
       
      optional int32 availability_domain_count = 12453432;
      Specified by:
      getAvailabilityDomainCount in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The availabilityDomainCount.
    • setAvailabilityDomainCount

      public ResourcePolicyGroupPlacementPolicy.Builder setAvailabilityDomainCount(int value)
       The number of availability domains to spread instances across. If two
       instances are in different availability domain, they are not in the same
       low latency network.
       
      optional int32 availability_domain_count = 12453432;
      Parameters:
      value - The availabilityDomainCount to set.
      Returns:
      This builder for chaining.
    • clearAvailabilityDomainCount

      public ResourcePolicyGroupPlacementPolicy.Builder clearAvailabilityDomainCount()
       The number of availability domains to spread instances across. If two
       instances are in different availability domain, they are not in the same
       low latency network.
       
      optional int32 availability_domain_count = 12453432;
      Returns:
      This builder for chaining.
    • hasCollocation

      public boolean hasCollocation()
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Specified by:
      hasCollocation in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      Whether the collocation field is set.
    • getCollocation

      public String getCollocation()
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Specified by:
      getCollocation in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The collocation.
    • getCollocationBytes

      public com.google.protobuf.ByteString getCollocationBytes()
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Specified by:
      getCollocationBytes in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The bytes for collocation.
    • setCollocation

      public ResourcePolicyGroupPlacementPolicy.Builder setCollocation(String value)
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Parameters:
      value - The collocation to set.
      Returns:
      This builder for chaining.
    • clearCollocation

      public ResourcePolicyGroupPlacementPolicy.Builder clearCollocation()
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Returns:
      This builder for chaining.
    • setCollocationBytes

      public ResourcePolicyGroupPlacementPolicy.Builder setCollocationBytes(com.google.protobuf.ByteString value)
       Specifies network collocation
       Check the Collocation enum for the list of possible values.
       
      optional string collocation = 511156533;
      Parameters:
      value - The bytes for collocation to set.
      Returns:
      This builder for chaining.
    • hasGpuTopology

      public boolean hasGpuTopology()
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Specified by:
      hasGpuTopology in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      Whether the gpuTopology field is set.
    • getGpuTopology

      public String getGpuTopology()
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Specified by:
      getGpuTopology in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The gpuTopology.
    • getGpuTopologyBytes

      public com.google.protobuf.ByteString getGpuTopologyBytes()
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Specified by:
      getGpuTopologyBytes in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The bytes for gpuTopology.
    • setGpuTopology

      public ResourcePolicyGroupPlacementPolicy.Builder setGpuTopology(String value)
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Parameters:
      value - The gpuTopology to set.
      Returns:
      This builder for chaining.
    • clearGpuTopology

      public ResourcePolicyGroupPlacementPolicy.Builder clearGpuTopology()
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Returns:
      This builder for chaining.
    • setGpuTopologyBytes

      public ResourcePolicyGroupPlacementPolicy.Builder setGpuTopologyBytes(com.google.protobuf.ByteString value)
       Specifies the shape of the GPU slice, in slice based GPU families eg.
       A4X.
       
      optional string gpu_topology = 247948450;
      Parameters:
      value - The bytes for gpuTopology to set.
      Returns:
      This builder for chaining.
    • hasVmCount

      public boolean hasVmCount()
       Number of VMs in this placement group. Google does not recommend that you
       use this field unless you use a compact policy and you want your policy
       to work only if it contains this exact number of VMs.
       
      optional int32 vm_count = 261463431;
      Specified by:
      hasVmCount in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      Whether the vmCount field is set.
    • getVmCount

      public int getVmCount()
       Number of VMs in this placement group. Google does not recommend that you
       use this field unless you use a compact policy and you want your policy
       to work only if it contains this exact number of VMs.
       
      optional int32 vm_count = 261463431;
      Specified by:
      getVmCount in interface ResourcePolicyGroupPlacementPolicyOrBuilder
      Returns:
      The vmCount.
    • setVmCount

      public ResourcePolicyGroupPlacementPolicy.Builder setVmCount(int value)
       Number of VMs in this placement group. Google does not recommend that you
       use this field unless you use a compact policy and you want your policy
       to work only if it contains this exact number of VMs.
       
      optional int32 vm_count = 261463431;
      Parameters:
      value - The vmCount to set.
      Returns:
      This builder for chaining.
    • clearVmCount

       Number of VMs in this placement group. Google does not recommend that you
       use this field unless you use a compact policy and you want your policy
       to work only if it contains this exact number of VMs.
       
      optional int32 vm_count = 261463431;
      Returns:
      This builder for chaining.