@java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec());
    }
    if (minReplicaCount_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minReplicaCount_);
    }
    if (maxReplicaCount_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_);
    }
    for (int i = 0; i < autoscalingMetricSpecs_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, autoscalingMetricSpecs_.get(i));
    }
    if (spot_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, spot_);
    }
    if (requiredReplicaCount_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, requiredReplicaCount_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<pre>
Optional. If true, schedule the deployment workload on [spot
VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
</pre>

<code>bool spot = 5 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The spot.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java