Class Compute.InstanceShape.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Compute.InstanceShape.Builder>
com.google.protobuf.GeneratedMessage.Builder<Compute.InstanceShape.Builder>
namespace.cloud.compute.v1beta.Compute.InstanceShape.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Compute.InstanceShapeOrBuilder
Enclosing class:
Compute.InstanceShape

public static final class Compute.InstanceShape.Builder extends com.google.protobuf.GeneratedMessage.Builder<Compute.InstanceShape.Builder> implements Compute.InstanceShapeOrBuilder
 Defines an instance shape: the combination of CPU, RAM and Disk that the
 instance should use.

 The size of the ephemeral disk automatically scales with the selected CPU/RAM allocation.
 See also https://namespace.so/docs/architecture/compute/machine-shapes#storage-allocation

 Usable values are constrained by policy, and are typically only settable in
 values as powers of two.
 
Protobuf type namespace.cloud.compute.v1beta.InstanceShape
  • 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<Compute.InstanceShape.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<Compute.InstanceShape.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<Compute.InstanceShape.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Compute.InstanceShape.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<Compute.InstanceShape.Builder>
      Throws:
      IOException
    • getVirtualCpu

      public int getVirtualCpu()
       Number of virtual CPUs. Typically a power of two (e.g. 2, 4, 8, 16).
       
      int32 virtual_cpu = 1;
      Specified by:
      getVirtualCpu in interface Compute.InstanceShapeOrBuilder
      Returns:
      The virtualCpu.
    • setVirtualCpu

      public Compute.InstanceShape.Builder setVirtualCpu(int value)
       Number of virtual CPUs. Typically a power of two (e.g. 2, 4, 8, 16).
       
      int32 virtual_cpu = 1;
      Parameters:
      value - The virtualCpu to set.
      Returns:
      This builder for chaining.
    • clearVirtualCpu

      public Compute.InstanceShape.Builder clearVirtualCpu()
       Number of virtual CPUs. Typically a power of two (e.g. 2, 4, 8, 16).
       
      int32 virtual_cpu = 1;
      Returns:
      This builder for chaining.
    • getMemoryMegabytes

      public int getMemoryMegabytes()
       Memory in megabytes. Typically scales with CPU (e.g. 2048 per vCPU).
       
      int32 memory_megabytes = 2;
      Specified by:
      getMemoryMegabytes in interface Compute.InstanceShapeOrBuilder
      Returns:
      The memoryMegabytes.
    • setMemoryMegabytes

      public Compute.InstanceShape.Builder setMemoryMegabytes(int value)
       Memory in megabytes. Typically scales with CPU (e.g. 2048 per vCPU).
       
      int32 memory_megabytes = 2;
      Parameters:
      value - The memoryMegabytes to set.
      Returns:
      This builder for chaining.
    • clearMemoryMegabytes

      public Compute.InstanceShape.Builder clearMemoryMegabytes()
       Memory in megabytes. Typically scales with CPU (e.g. 2048 per vCPU).
       
      int32 memory_megabytes = 2;
      Returns:
      This builder for chaining.
    • getMachineArch

      public String getMachineArch()
       Architecture of the instance, e.g. "amd64" or "arm64".
       
      string machine_arch = 3;
      Specified by:
      getMachineArch in interface Compute.InstanceShapeOrBuilder
      Returns:
      The machineArch.
    • getMachineArchBytes

      public com.google.protobuf.ByteString getMachineArchBytes()
       Architecture of the instance, e.g. "amd64" or "arm64".
       
      string machine_arch = 3;
      Specified by:
      getMachineArchBytes in interface Compute.InstanceShapeOrBuilder
      Returns:
      The bytes for machineArch.
    • setMachineArch

      public Compute.InstanceShape.Builder setMachineArch(String value)
       Architecture of the instance, e.g. "amd64" or "arm64".
       
      string machine_arch = 3;
      Parameters:
      value - The machineArch to set.
      Returns:
      This builder for chaining.
    • clearMachineArch

      public Compute.InstanceShape.Builder clearMachineArch()
       Architecture of the instance, e.g. "amd64" or "arm64".
       
      string machine_arch = 3;
      Returns:
      This builder for chaining.
    • setMachineArchBytes

      public Compute.InstanceShape.Builder setMachineArchBytes(com.google.protobuf.ByteString value)
       Architecture of the instance, e.g. "amd64" or "arm64".
       
      string machine_arch = 3;
      Parameters:
      value - The bytes for machineArch to set.
      Returns:
      This builder for chaining.
    • getOs

      public String getOs()
       Operating system of the instance, e.g. "linux" or "macos".
       
      string os = 4;
      Specified by:
      getOs in interface Compute.InstanceShapeOrBuilder
      Returns:
      The os.
    • getOsBytes

      public com.google.protobuf.ByteString getOsBytes()
       Operating system of the instance, e.g. "linux" or "macos".
       
      string os = 4;
      Specified by:
      getOsBytes in interface Compute.InstanceShapeOrBuilder
      Returns:
      The bytes for os.
    • setOs

      public Compute.InstanceShape.Builder setOs(String value)
       Operating system of the instance, e.g. "linux" or "macos".
       
      string os = 4;
      Parameters:
      value - The os to set.
      Returns:
      This builder for chaining.
    • clearOs

       Operating system of the instance, e.g. "linux" or "macos".
       
      string os = 4;
      Returns:
      This builder for chaining.
    • setOsBytes

      public Compute.InstanceShape.Builder setOsBytes(com.google.protobuf.ByteString value)
       Operating system of the instance, e.g. "linux" or "macos".
       
      string os = 4;
      Parameters:
      value - The bytes for os to set.
      Returns:
      This builder for chaining.
    • getSelectorsList

      public List<Labels.Label> getSelectorsList()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
      Specified by:
      getSelectorsList in interface Compute.InstanceShapeOrBuilder
    • getSelectorsCount

      public int getSelectorsCount()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
      Specified by:
      getSelectorsCount in interface Compute.InstanceShapeOrBuilder
    • getSelectors

      public Labels.Label getSelectors(int index)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
      Specified by:
      getSelectors in interface Compute.InstanceShapeOrBuilder
    • setSelectors

      public Compute.InstanceShape.Builder setSelectors(int index, Labels.Label value)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • setSelectors

      public Compute.InstanceShape.Builder setSelectors(int index, Labels.Label.Builder builderForValue)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addSelectors

      public Compute.InstanceShape.Builder addSelectors(Labels.Label value)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addSelectors

      public Compute.InstanceShape.Builder addSelectors(int index, Labels.Label value)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addSelectors

      public Compute.InstanceShape.Builder addSelectors(Labels.Label.Builder builderForValue)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addSelectors

      public Compute.InstanceShape.Builder addSelectors(int index, Labels.Label.Builder builderForValue)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addAllSelectors

      public Compute.InstanceShape.Builder addAllSelectors(Iterable<? extends Labels.Label> values)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • clearSelectors

      public Compute.InstanceShape.Builder clearSelectors()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • removeSelectors

      public Compute.InstanceShape.Builder removeSelectors(int index)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • getSelectorsBuilder

      public Labels.Label.Builder getSelectorsBuilder(int index)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • getSelectorsOrBuilder

      public Labels.LabelOrBuilder getSelectorsOrBuilder(int index)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
      Specified by:
      getSelectorsOrBuilder in interface Compute.InstanceShapeOrBuilder
    • getSelectorsOrBuilderList

      public List<? extends Labels.LabelOrBuilder> getSelectorsOrBuilderList()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
      Specified by:
      getSelectorsOrBuilderList in interface Compute.InstanceShapeOrBuilder
    • addSelectorsBuilder

      public Labels.Label.Builder addSelectorsBuilder()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • addSelectorsBuilder

      public Labels.Label.Builder addSelectorsBuilder(int index)
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;
    • getSelectorsBuilderList

      public List<Labels.Label.Builder> getSelectorsBuilderList()
       Provide additional constraints to instance selection. Available selectors:
       https://namespace.so/docs/architecture/compute/macos#available-selectors
       
      repeated .namespace.stdlib.Label selectors = 5;