All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ray.serve.generated.DeploymentVersion Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: src/ray/protobuf/serve.proto

package io.ray.serve.generated;

/**
 * Protobuf type {@code ray.serve.DeploymentVersion}
 */
public final class DeploymentVersion extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:ray.serve.DeploymentVersion)
    DeploymentVersionOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DeploymentVersion.newBuilder() to construct.
  private DeploymentVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private DeploymentVersion() {
    codeVersion_ = "";
    rayActorOptions_ = "";
    placementGroupBundles_ = "";
    placementGroupStrategy_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new DeploymentVersion();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DeploymentVersion(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            codeVersion_ = s;
            break;
          }
          case 18: {
            io.ray.serve.generated.DeploymentConfig.Builder subBuilder = null;
            if (deploymentConfig_ != null) {
              subBuilder = deploymentConfig_.toBuilder();
            }
            deploymentConfig_ = input.readMessage(io.ray.serve.generated.DeploymentConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(deploymentConfig_);
              deploymentConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            rayActorOptions_ = s;
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            placementGroupBundles_ = s;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            placementGroupStrategy_ = s;
            break;
          }
          case 48: {

            maxReplicasPerNode_ = input.readInt32();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_DeploymentVersion_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_DeploymentVersion_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.ray.serve.generated.DeploymentVersion.class, io.ray.serve.generated.DeploymentVersion.Builder.class);
  }

  public static final int CODE_VERSION_FIELD_NUMBER = 1;
  private volatile java.lang.Object codeVersion_;
  /**
   * string code_version = 1 [json_name = "codeVersion"];
   * @return The codeVersion.
   */
  @java.lang.Override
  public java.lang.String getCodeVersion() {
    java.lang.Object ref = codeVersion_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      codeVersion_ = s;
      return s;
    }
  }
  /**
   * string code_version = 1 [json_name = "codeVersion"];
   * @return The bytes for codeVersion.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getCodeVersionBytes() {
    java.lang.Object ref = codeVersion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      codeVersion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPLOYMENT_CONFIG_FIELD_NUMBER = 2;
  private io.ray.serve.generated.DeploymentConfig deploymentConfig_;
  /**
   * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
   * @return Whether the deploymentConfig field is set.
   */
  @java.lang.Override
  public boolean hasDeploymentConfig() {
    return deploymentConfig_ != null;
  }
  /**
   * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
   * @return The deploymentConfig.
   */
  @java.lang.Override
  public io.ray.serve.generated.DeploymentConfig getDeploymentConfig() {
    return deploymentConfig_ == null ? io.ray.serve.generated.DeploymentConfig.getDefaultInstance() : deploymentConfig_;
  }
  /**
   * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
   */
  @java.lang.Override
  public io.ray.serve.generated.DeploymentConfigOrBuilder getDeploymentConfigOrBuilder() {
    return getDeploymentConfig();
  }

  public static final int RAY_ACTOR_OPTIONS_FIELD_NUMBER = 3;
  private volatile java.lang.Object rayActorOptions_;
  /**
   * string ray_actor_options = 3 [json_name = "rayActorOptions"];
   * @return The rayActorOptions.
   */
  @java.lang.Override
  public java.lang.String getRayActorOptions() {
    java.lang.Object ref = rayActorOptions_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      rayActorOptions_ = s;
      return s;
    }
  }
  /**
   * string ray_actor_options = 3 [json_name = "rayActorOptions"];
   * @return The bytes for rayActorOptions.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRayActorOptionsBytes() {
    java.lang.Object ref = rayActorOptions_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      rayActorOptions_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PLACEMENT_GROUP_BUNDLES_FIELD_NUMBER = 4;
  private volatile java.lang.Object placementGroupBundles_;
  /**
   * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
   * @return The placementGroupBundles.
   */
  @java.lang.Override
  public java.lang.String getPlacementGroupBundles() {
    java.lang.Object ref = placementGroupBundles_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      placementGroupBundles_ = s;
      return s;
    }
  }
  /**
   * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
   * @return The bytes for placementGroupBundles.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPlacementGroupBundlesBytes() {
    java.lang.Object ref = placementGroupBundles_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      placementGroupBundles_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PLACEMENT_GROUP_STRATEGY_FIELD_NUMBER = 5;
  private volatile java.lang.Object placementGroupStrategy_;
  /**
   * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
   * @return The placementGroupStrategy.
   */
  @java.lang.Override
  public java.lang.String getPlacementGroupStrategy() {
    java.lang.Object ref = placementGroupStrategy_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      placementGroupStrategy_ = s;
      return s;
    }
  }
  /**
   * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
   * @return The bytes for placementGroupStrategy.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPlacementGroupStrategyBytes() {
    java.lang.Object ref = placementGroupStrategy_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      placementGroupStrategy_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MAX_REPLICAS_PER_NODE_FIELD_NUMBER = 6;
  private int maxReplicasPerNode_;
  /**
   * int32 max_replicas_per_node = 6 [json_name = "maxReplicasPerNode"];
   * @return The maxReplicasPerNode.
   */
  @java.lang.Override
  public int getMaxReplicasPerNode() {
    return maxReplicasPerNode_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(codeVersion_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, codeVersion_);
    }
    if (deploymentConfig_ != null) {
      output.writeMessage(2, getDeploymentConfig());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rayActorOptions_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rayActorOptions_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placementGroupBundles_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, placementGroupBundles_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placementGroupStrategy_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, placementGroupStrategy_);
    }
    if (maxReplicasPerNode_ != 0) {
      output.writeInt32(6, maxReplicasPerNode_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(codeVersion_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, codeVersion_);
    }
    if (deploymentConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getDeploymentConfig());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rayActorOptions_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rayActorOptions_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placementGroupBundles_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, placementGroupBundles_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placementGroupStrategy_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, placementGroupStrategy_);
    }
    if (maxReplicasPerNode_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, maxReplicasPerNode_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof io.ray.serve.generated.DeploymentVersion)) {
      return super.equals(obj);
    }
    io.ray.serve.generated.DeploymentVersion other = (io.ray.serve.generated.DeploymentVersion) obj;

    if (!getCodeVersion()
        .equals(other.getCodeVersion())) return false;
    if (hasDeploymentConfig() != other.hasDeploymentConfig()) return false;
    if (hasDeploymentConfig()) {
      if (!getDeploymentConfig()
          .equals(other.getDeploymentConfig())) return false;
    }
    if (!getRayActorOptions()
        .equals(other.getRayActorOptions())) return false;
    if (!getPlacementGroupBundles()
        .equals(other.getPlacementGroupBundles())) return false;
    if (!getPlacementGroupStrategy()
        .equals(other.getPlacementGroupStrategy())) return false;
    if (getMaxReplicasPerNode()
        != other.getMaxReplicasPerNode()) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CODE_VERSION_FIELD_NUMBER;
    hash = (53 * hash) + getCodeVersion().hashCode();
    if (hasDeploymentConfig()) {
      hash = (37 * hash) + DEPLOYMENT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getDeploymentConfig().hashCode();
    }
    hash = (37 * hash) + RAY_ACTOR_OPTIONS_FIELD_NUMBER;
    hash = (53 * hash) + getRayActorOptions().hashCode();
    hash = (37 * hash) + PLACEMENT_GROUP_BUNDLES_FIELD_NUMBER;
    hash = (53 * hash) + getPlacementGroupBundles().hashCode();
    hash = (37 * hash) + PLACEMENT_GROUP_STRATEGY_FIELD_NUMBER;
    hash = (53 * hash) + getPlacementGroupStrategy().hashCode();
    hash = (37 * hash) + MAX_REPLICAS_PER_NODE_FIELD_NUMBER;
    hash = (53 * hash) + getMaxReplicasPerNode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static io.ray.serve.generated.DeploymentVersion parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.DeploymentVersion parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.DeploymentVersion parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(io.ray.serve.generated.DeploymentVersion prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code ray.serve.DeploymentVersion}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:ray.serve.DeploymentVersion)
      io.ray.serve.generated.DeploymentVersionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_DeploymentVersion_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_DeploymentVersion_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.ray.serve.generated.DeploymentVersion.class, io.ray.serve.generated.DeploymentVersion.Builder.class);
    }

    // Construct using io.ray.serve.generated.DeploymentVersion.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      codeVersion_ = "";

      if (deploymentConfigBuilder_ == null) {
        deploymentConfig_ = null;
      } else {
        deploymentConfig_ = null;
        deploymentConfigBuilder_ = null;
      }
      rayActorOptions_ = "";

      placementGroupBundles_ = "";

      placementGroupStrategy_ = "";

      maxReplicasPerNode_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_DeploymentVersion_descriptor;
    }

    @java.lang.Override
    public io.ray.serve.generated.DeploymentVersion getDefaultInstanceForType() {
      return io.ray.serve.generated.DeploymentVersion.getDefaultInstance();
    }

    @java.lang.Override
    public io.ray.serve.generated.DeploymentVersion build() {
      io.ray.serve.generated.DeploymentVersion result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.ray.serve.generated.DeploymentVersion buildPartial() {
      io.ray.serve.generated.DeploymentVersion result = new io.ray.serve.generated.DeploymentVersion(this);
      result.codeVersion_ = codeVersion_;
      if (deploymentConfigBuilder_ == null) {
        result.deploymentConfig_ = deploymentConfig_;
      } else {
        result.deploymentConfig_ = deploymentConfigBuilder_.build();
      }
      result.rayActorOptions_ = rayActorOptions_;
      result.placementGroupBundles_ = placementGroupBundles_;
      result.placementGroupStrategy_ = placementGroupStrategy_;
      result.maxReplicasPerNode_ = maxReplicasPerNode_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof io.ray.serve.generated.DeploymentVersion) {
        return mergeFrom((io.ray.serve.generated.DeploymentVersion)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.ray.serve.generated.DeploymentVersion other) {
      if (other == io.ray.serve.generated.DeploymentVersion.getDefaultInstance()) return this;
      if (!other.getCodeVersion().isEmpty()) {
        codeVersion_ = other.codeVersion_;
        onChanged();
      }
      if (other.hasDeploymentConfig()) {
        mergeDeploymentConfig(other.getDeploymentConfig());
      }
      if (!other.getRayActorOptions().isEmpty()) {
        rayActorOptions_ = other.rayActorOptions_;
        onChanged();
      }
      if (!other.getPlacementGroupBundles().isEmpty()) {
        placementGroupBundles_ = other.placementGroupBundles_;
        onChanged();
      }
      if (!other.getPlacementGroupStrategy().isEmpty()) {
        placementGroupStrategy_ = other.placementGroupStrategy_;
        onChanged();
      }
      if (other.getMaxReplicasPerNode() != 0) {
        setMaxReplicasPerNode(other.getMaxReplicasPerNode());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      io.ray.serve.generated.DeploymentVersion parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.ray.serve.generated.DeploymentVersion) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object codeVersion_ = "";
    /**
     * string code_version = 1 [json_name = "codeVersion"];
     * @return The codeVersion.
     */
    public java.lang.String getCodeVersion() {
      java.lang.Object ref = codeVersion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        codeVersion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string code_version = 1 [json_name = "codeVersion"];
     * @return The bytes for codeVersion.
     */
    public com.google.protobuf.ByteString
        getCodeVersionBytes() {
      java.lang.Object ref = codeVersion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        codeVersion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string code_version = 1 [json_name = "codeVersion"];
     * @param value The codeVersion to set.
     * @return This builder for chaining.
     */
    public Builder setCodeVersion(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      codeVersion_ = value;
      onChanged();
      return this;
    }
    /**
     * string code_version = 1 [json_name = "codeVersion"];
     * @return This builder for chaining.
     */
    public Builder clearCodeVersion() {
      
      codeVersion_ = getDefaultInstance().getCodeVersion();
      onChanged();
      return this;
    }
    /**
     * string code_version = 1 [json_name = "codeVersion"];
     * @param value The bytes for codeVersion to set.
     * @return This builder for chaining.
     */
    public Builder setCodeVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      codeVersion_ = value;
      onChanged();
      return this;
    }

    private io.ray.serve.generated.DeploymentConfig deploymentConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.ray.serve.generated.DeploymentConfig, io.ray.serve.generated.DeploymentConfig.Builder, io.ray.serve.generated.DeploymentConfigOrBuilder> deploymentConfigBuilder_;
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     * @return Whether the deploymentConfig field is set.
     */
    public boolean hasDeploymentConfig() {
      return deploymentConfigBuilder_ != null || deploymentConfig_ != null;
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     * @return The deploymentConfig.
     */
    public io.ray.serve.generated.DeploymentConfig getDeploymentConfig() {
      if (deploymentConfigBuilder_ == null) {
        return deploymentConfig_ == null ? io.ray.serve.generated.DeploymentConfig.getDefaultInstance() : deploymentConfig_;
      } else {
        return deploymentConfigBuilder_.getMessage();
      }
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public Builder setDeploymentConfig(io.ray.serve.generated.DeploymentConfig value) {
      if (deploymentConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deploymentConfig_ = value;
        onChanged();
      } else {
        deploymentConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public Builder setDeploymentConfig(
        io.ray.serve.generated.DeploymentConfig.Builder builderForValue) {
      if (deploymentConfigBuilder_ == null) {
        deploymentConfig_ = builderForValue.build();
        onChanged();
      } else {
        deploymentConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public Builder mergeDeploymentConfig(io.ray.serve.generated.DeploymentConfig value) {
      if (deploymentConfigBuilder_ == null) {
        if (deploymentConfig_ != null) {
          deploymentConfig_ =
            io.ray.serve.generated.DeploymentConfig.newBuilder(deploymentConfig_).mergeFrom(value).buildPartial();
        } else {
          deploymentConfig_ = value;
        }
        onChanged();
      } else {
        deploymentConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public Builder clearDeploymentConfig() {
      if (deploymentConfigBuilder_ == null) {
        deploymentConfig_ = null;
        onChanged();
      } else {
        deploymentConfig_ = null;
        deploymentConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public io.ray.serve.generated.DeploymentConfig.Builder getDeploymentConfigBuilder() {
      
      onChanged();
      return getDeploymentConfigFieldBuilder().getBuilder();
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    public io.ray.serve.generated.DeploymentConfigOrBuilder getDeploymentConfigOrBuilder() {
      if (deploymentConfigBuilder_ != null) {
        return deploymentConfigBuilder_.getMessageOrBuilder();
      } else {
        return deploymentConfig_ == null ?
            io.ray.serve.generated.DeploymentConfig.getDefaultInstance() : deploymentConfig_;
      }
    }
    /**
     * .ray.serve.DeploymentConfig deployment_config = 2 [json_name = "deploymentConfig"];
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.ray.serve.generated.DeploymentConfig, io.ray.serve.generated.DeploymentConfig.Builder, io.ray.serve.generated.DeploymentConfigOrBuilder> 
        getDeploymentConfigFieldBuilder() {
      if (deploymentConfigBuilder_ == null) {
        deploymentConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.ray.serve.generated.DeploymentConfig, io.ray.serve.generated.DeploymentConfig.Builder, io.ray.serve.generated.DeploymentConfigOrBuilder>(
                getDeploymentConfig(),
                getParentForChildren(),
                isClean());
        deploymentConfig_ = null;
      }
      return deploymentConfigBuilder_;
    }

    private java.lang.Object rayActorOptions_ = "";
    /**
     * string ray_actor_options = 3 [json_name = "rayActorOptions"];
     * @return The rayActorOptions.
     */
    public java.lang.String getRayActorOptions() {
      java.lang.Object ref = rayActorOptions_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        rayActorOptions_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string ray_actor_options = 3 [json_name = "rayActorOptions"];
     * @return The bytes for rayActorOptions.
     */
    public com.google.protobuf.ByteString
        getRayActorOptionsBytes() {
      java.lang.Object ref = rayActorOptions_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        rayActorOptions_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string ray_actor_options = 3 [json_name = "rayActorOptions"];
     * @param value The rayActorOptions to set.
     * @return This builder for chaining.
     */
    public Builder setRayActorOptions(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      rayActorOptions_ = value;
      onChanged();
      return this;
    }
    /**
     * string ray_actor_options = 3 [json_name = "rayActorOptions"];
     * @return This builder for chaining.
     */
    public Builder clearRayActorOptions() {
      
      rayActorOptions_ = getDefaultInstance().getRayActorOptions();
      onChanged();
      return this;
    }
    /**
     * string ray_actor_options = 3 [json_name = "rayActorOptions"];
     * @param value The bytes for rayActorOptions to set.
     * @return This builder for chaining.
     */
    public Builder setRayActorOptionsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      rayActorOptions_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object placementGroupBundles_ = "";
    /**
     * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
     * @return The placementGroupBundles.
     */
    public java.lang.String getPlacementGroupBundles() {
      java.lang.Object ref = placementGroupBundles_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        placementGroupBundles_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
     * @return The bytes for placementGroupBundles.
     */
    public com.google.protobuf.ByteString
        getPlacementGroupBundlesBytes() {
      java.lang.Object ref = placementGroupBundles_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        placementGroupBundles_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
     * @param value The placementGroupBundles to set.
     * @return This builder for chaining.
     */
    public Builder setPlacementGroupBundles(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      placementGroupBundles_ = value;
      onChanged();
      return this;
    }
    /**
     * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
     * @return This builder for chaining.
     */
    public Builder clearPlacementGroupBundles() {
      
      placementGroupBundles_ = getDefaultInstance().getPlacementGroupBundles();
      onChanged();
      return this;
    }
    /**
     * string placement_group_bundles = 4 [json_name = "placementGroupBundles"];
     * @param value The bytes for placementGroupBundles to set.
     * @return This builder for chaining.
     */
    public Builder setPlacementGroupBundlesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      placementGroupBundles_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object placementGroupStrategy_ = "";
    /**
     * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
     * @return The placementGroupStrategy.
     */
    public java.lang.String getPlacementGroupStrategy() {
      java.lang.Object ref = placementGroupStrategy_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        placementGroupStrategy_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
     * @return The bytes for placementGroupStrategy.
     */
    public com.google.protobuf.ByteString
        getPlacementGroupStrategyBytes() {
      java.lang.Object ref = placementGroupStrategy_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        placementGroupStrategy_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
     * @param value The placementGroupStrategy to set.
     * @return This builder for chaining.
     */
    public Builder setPlacementGroupStrategy(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      placementGroupStrategy_ = value;
      onChanged();
      return this;
    }
    /**
     * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
     * @return This builder for chaining.
     */
    public Builder clearPlacementGroupStrategy() {
      
      placementGroupStrategy_ = getDefaultInstance().getPlacementGroupStrategy();
      onChanged();
      return this;
    }
    /**
     * string placement_group_strategy = 5 [json_name = "placementGroupStrategy"];
     * @param value The bytes for placementGroupStrategy to set.
     * @return This builder for chaining.
     */
    public Builder setPlacementGroupStrategyBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      placementGroupStrategy_ = value;
      onChanged();
      return this;
    }

    private int maxReplicasPerNode_ ;
    /**
     * int32 max_replicas_per_node = 6 [json_name = "maxReplicasPerNode"];
     * @return The maxReplicasPerNode.
     */
    @java.lang.Override
    public int getMaxReplicasPerNode() {
      return maxReplicasPerNode_;
    }
    /**
     * int32 max_replicas_per_node = 6 [json_name = "maxReplicasPerNode"];
     * @param value The maxReplicasPerNode to set.
     * @return This builder for chaining.
     */
    public Builder setMaxReplicasPerNode(int value) {
      
      maxReplicasPerNode_ = value;
      onChanged();
      return this;
    }
    /**
     * int32 max_replicas_per_node = 6 [json_name = "maxReplicasPerNode"];
     * @return This builder for chaining.
     */
    public Builder clearMaxReplicasPerNode() {
      
      maxReplicasPerNode_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:ray.serve.DeploymentVersion)
  }

  // @@protoc_insertion_point(class_scope:ray.serve.DeploymentVersion)
  private static final io.ray.serve.generated.DeploymentVersion DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.ray.serve.generated.DeploymentVersion();
  }

  public static io.ray.serve.generated.DeploymentVersion getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public DeploymentVersion parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new DeploymentVersion(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public io.ray.serve.generated.DeploymentVersion getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy