Class AllocationPolicy.PlacementPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.PlacementPolicy.Builder>
com.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.Builder
All Implemented Interfaces:
AllocationPolicy.PlacementPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AllocationPolicy.PlacementPolicy

public static final class AllocationPolicy.PlacementPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.PlacementPolicy.Builder> implements AllocationPolicy.PlacementPolicyOrBuilder
 PlacementPolicy describes a group placement policy for the VMs controlled
 by this AllocationPolicy.
 
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy
  • 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<AllocationPolicy.PlacementPolicy.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<AllocationPolicy.PlacementPolicy.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<AllocationPolicy.PlacementPolicy.Builder>
    • getDefaultInstanceForType

      public AllocationPolicy.PlacementPolicy 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 AllocationPolicy.PlacementPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public AllocationPolicy.PlacementPolicy.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<AllocationPolicy.PlacementPolicy.Builder>
      Throws:
      IOException
    • getCollocation

      public String getCollocation()
       UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
       want VMs to be located close to each other for low network latency
       between the VMs. No placement policy will be generated when collocation
       is UNSPECIFIED.
       
      string collocation = 1;
      Specified by:
      getCollocation in interface AllocationPolicy.PlacementPolicyOrBuilder
      Returns:
      The collocation.
    • getCollocationBytes

      public com.google.protobuf.ByteString getCollocationBytes()
       UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
       want VMs to be located close to each other for low network latency
       between the VMs. No placement policy will be generated when collocation
       is UNSPECIFIED.
       
      string collocation = 1;
      Specified by:
      getCollocationBytes in interface AllocationPolicy.PlacementPolicyOrBuilder
      Returns:
      The bytes for collocation.
    • setCollocation

      public AllocationPolicy.PlacementPolicy.Builder setCollocation(String value)
       UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
       want VMs to be located close to each other for low network latency
       between the VMs. No placement policy will be generated when collocation
       is UNSPECIFIED.
       
      string collocation = 1;
      Parameters:
      value - The collocation to set.
      Returns:
      This builder for chaining.
    • clearCollocation

      public AllocationPolicy.PlacementPolicy.Builder clearCollocation()
       UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
       want VMs to be located close to each other for low network latency
       between the VMs. No placement policy will be generated when collocation
       is UNSPECIFIED.
       
      string collocation = 1;
      Returns:
      This builder for chaining.
    • setCollocationBytes

      public AllocationPolicy.PlacementPolicy.Builder setCollocationBytes(com.google.protobuf.ByteString value)
       UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
       want VMs to be located close to each other for low network latency
       between the VMs. No placement policy will be generated when collocation
       is UNSPECIFIED.
       
      string collocation = 1;
      Parameters:
      value - The bytes for collocation to set.
      Returns:
      This builder for chaining.
    • getMaxDistance

      public long getMaxDistance()
       When specified, causes the job to fail if more than max_distance logical
       switches are required between VMs. Batch uses the most compact possible
       placement of VMs even when max_distance is not specified. An explicit
       max_distance makes that level of compactness a strict requirement.
       Not yet implemented
       
      int64 max_distance = 2;
      Specified by:
      getMaxDistance in interface AllocationPolicy.PlacementPolicyOrBuilder
      Returns:
      The maxDistance.
    • setMaxDistance

      public AllocationPolicy.PlacementPolicy.Builder setMaxDistance(long value)
       When specified, causes the job to fail if more than max_distance logical
       switches are required between VMs. Batch uses the most compact possible
       placement of VMs even when max_distance is not specified. An explicit
       max_distance makes that level of compactness a strict requirement.
       Not yet implemented
       
      int64 max_distance = 2;
      Parameters:
      value - The maxDistance to set.
      Returns:
      This builder for chaining.
    • clearMaxDistance

      public AllocationPolicy.PlacementPolicy.Builder clearMaxDistance()
       When specified, causes the job to fail if more than max_distance logical
       switches are required between VMs. Batch uses the most compact possible
       placement of VMs even when max_distance is not specified. An explicit
       max_distance makes that level of compactness a strict requirement.
       Not yet implemented
       
      int64 max_distance = 2;
      Returns:
      This builder for chaining.