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

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

There is a newer version: 2.39.0
Show 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.RequestMetadata}
 */
public final class RequestMetadata extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:ray.serve.RequestMetadata)
    RequestMetadataOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RequestMetadata.newBuilder() to construct.
  private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private RequestMetadata() {
    requestId_ = "";
    endpoint_ = "";
    callMethod_ = "";
    multiplexedModelId_ = "";
    route_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private RequestMetadata(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    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();

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

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

            callMethod_ = s;
            break;
          }
          case 34: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              context_ = com.google.protobuf.MapField.newMapField(
                  ContextDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000001;
            }
            com.google.protobuf.MapEntry
            context__ = input.readMessage(
                ContextDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            context_.getMutableMap().put(
                context__.getKey(), context__.getValue());
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

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

            route_ = s;
            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_RequestMetadata_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 4:
        return internalGetContext();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_RequestMetadata_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.ray.serve.generated.RequestMetadata.class, io.ray.serve.generated.RequestMetadata.Builder.class);
  }

  public static final int REQUEST_ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object requestId_;
  /**
   * string request_id = 1 [json_name = "requestId"];
   * @return The requestId.
   */
  @java.lang.Override
  public java.lang.String getRequestId() {
    java.lang.Object ref = requestId_;
    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();
      requestId_ = s;
      return s;
    }
  }
  /**
   * string request_id = 1 [json_name = "requestId"];
   * @return The bytes for requestId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRequestIdBytes() {
    java.lang.Object ref = requestId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      requestId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENDPOINT_FIELD_NUMBER = 2;
  private volatile java.lang.Object endpoint_;
  /**
   * string endpoint = 2 [json_name = "endpoint"];
   * @return The endpoint.
   */
  @java.lang.Override
  public java.lang.String getEndpoint() {
    java.lang.Object ref = endpoint_;
    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();
      endpoint_ = s;
      return s;
    }
  }
  /**
   * string endpoint = 2 [json_name = "endpoint"];
   * @return The bytes for endpoint.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getEndpointBytes() {
    java.lang.Object ref = endpoint_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      endpoint_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CALL_METHOD_FIELD_NUMBER = 3;
  private volatile java.lang.Object callMethod_;
  /**
   * string call_method = 3 [json_name = "callMethod"];
   * @return The callMethod.
   */
  @java.lang.Override
  public java.lang.String getCallMethod() {
    java.lang.Object ref = callMethod_;
    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();
      callMethod_ = s;
      return s;
    }
  }
  /**
   * string call_method = 3 [json_name = "callMethod"];
   * @return The bytes for callMethod.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getCallMethodBytes() {
    java.lang.Object ref = callMethod_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      callMethod_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONTEXT_FIELD_NUMBER = 4;
  private static final class ContextDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.String> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                io.ray.serve.generated.ServeProtos.internal_static_ray_serve_RequestMetadata_ContextEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> context_;
  private com.google.protobuf.MapField
  internalGetContext() {
    if (context_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ContextDefaultEntryHolder.defaultEntry);
    }
    return context_;
  }

  public int getContextCount() {
    return internalGetContext().getMap().size();
  }
  /**
   * map<string, string> context = 4 [json_name = "context"];
   */

  @java.lang.Override
  public boolean containsContext(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetContext().getMap().containsKey(key);
  }
  /**
   * Use {@link #getContextMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map getContext() {
    return getContextMap();
  }
  /**
   * map<string, string> context = 4 [json_name = "context"];
   */
  @java.lang.Override

  public java.util.Map getContextMap() {
    return internalGetContext().getMap();
  }
  /**
   * map<string, string> context = 4 [json_name = "context"];
   */
  @java.lang.Override

  public java.lang.String getContextOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetContext().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, string> context = 4 [json_name = "context"];
   */
  @java.lang.Override

  public java.lang.String getContextOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetContext().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int MULTIPLEXED_MODEL_ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object multiplexedModelId_;
  /**
   * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
   * @return The multiplexedModelId.
   */
  @java.lang.Override
  public java.lang.String getMultiplexedModelId() {
    java.lang.Object ref = multiplexedModelId_;
    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();
      multiplexedModelId_ = s;
      return s;
    }
  }
  /**
   * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
   * @return The bytes for multiplexedModelId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMultiplexedModelIdBytes() {
    java.lang.Object ref = multiplexedModelId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      multiplexedModelId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ROUTE_FIELD_NUMBER = 6;
  private volatile java.lang.Object route_;
  /**
   * string route = 6 [json_name = "route"];
   * @return The route.
   */
  @java.lang.Override
  public java.lang.String getRoute() {
    java.lang.Object ref = route_;
    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();
      route_ = s;
      return s;
    }
  }
  /**
   * string route = 6 [json_name = "route"];
   * @return The bytes for route.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRouteBytes() {
    java.lang.Object ref = route_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      route_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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(requestId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endpoint_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callMethod_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, callMethod_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetContext(),
        ContextDefaultEntryHolder.defaultEntry,
        4);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(multiplexedModelId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, multiplexedModelId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(route_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, route_);
    }
    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(requestId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endpoint_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callMethod_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, callMethod_);
    }
    for (java.util.Map.Entry entry
         : internalGetContext().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      context__ = ContextDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, context__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(multiplexedModelId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, multiplexedModelId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(route_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, route_);
    }
    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.RequestMetadata)) {
      return super.equals(obj);
    }
    io.ray.serve.generated.RequestMetadata other = (io.ray.serve.generated.RequestMetadata) obj;

    if (!getRequestId()
        .equals(other.getRequestId())) return false;
    if (!getEndpoint()
        .equals(other.getEndpoint())) return false;
    if (!getCallMethod()
        .equals(other.getCallMethod())) return false;
    if (!internalGetContext().equals(
        other.internalGetContext())) return false;
    if (!getMultiplexedModelId()
        .equals(other.getMultiplexedModelId())) return false;
    if (!getRoute()
        .equals(other.getRoute())) 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) + REQUEST_ID_FIELD_NUMBER;
    hash = (53 * hash) + getRequestId().hashCode();
    hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
    hash = (53 * hash) + getEndpoint().hashCode();
    hash = (37 * hash) + CALL_METHOD_FIELD_NUMBER;
    hash = (53 * hash) + getCallMethod().hashCode();
    if (!internalGetContext().getMap().isEmpty()) {
      hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + internalGetContext().hashCode();
    }
    hash = (37 * hash) + MULTIPLEXED_MODEL_ID_FIELD_NUMBER;
    hash = (53 * hash) + getMultiplexedModelId().hashCode();
    hash = (37 * hash) + ROUTE_FIELD_NUMBER;
    hash = (53 * hash) + getRoute().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.ray.serve.generated.RequestMetadata parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.RequestMetadata 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.RequestMetadata parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.RequestMetadata 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.RequestMetadata parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.ray.serve.generated.RequestMetadata parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.ray.serve.generated.RequestMetadata parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.RequestMetadata 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.RequestMetadata parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.RequestMetadata 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.RequestMetadata parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.ray.serve.generated.RequestMetadata 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.RequestMetadata 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.RequestMetadata}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:ray.serve.RequestMetadata)
      io.ray.serve.generated.RequestMetadataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_RequestMetadata_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 4:
          return internalGetContext();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 4:
          return internalGetMutableContext();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.ray.serve.generated.ServeProtos.internal_static_ray_serve_RequestMetadata_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.ray.serve.generated.RequestMetadata.class, io.ray.serve.generated.RequestMetadata.Builder.class);
    }

    // Construct using io.ray.serve.generated.RequestMetadata.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();
      requestId_ = "";

      endpoint_ = "";

      callMethod_ = "";

      internalGetMutableContext().clear();
      multiplexedModelId_ = "";

      route_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public io.ray.serve.generated.RequestMetadata buildPartial() {
      io.ray.serve.generated.RequestMetadata result = new io.ray.serve.generated.RequestMetadata(this);
      int from_bitField0_ = bitField0_;
      result.requestId_ = requestId_;
      result.endpoint_ = endpoint_;
      result.callMethod_ = callMethod_;
      result.context_ = internalGetContext();
      result.context_.makeImmutable();
      result.multiplexedModelId_ = multiplexedModelId_;
      result.route_ = route_;
      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.RequestMetadata) {
        return mergeFrom((io.ray.serve.generated.RequestMetadata)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.ray.serve.generated.RequestMetadata other) {
      if (other == io.ray.serve.generated.RequestMetadata.getDefaultInstance()) return this;
      if (!other.getRequestId().isEmpty()) {
        requestId_ = other.requestId_;
        onChanged();
      }
      if (!other.getEndpoint().isEmpty()) {
        endpoint_ = other.endpoint_;
        onChanged();
      }
      if (!other.getCallMethod().isEmpty()) {
        callMethod_ = other.callMethod_;
        onChanged();
      }
      internalGetMutableContext().mergeFrom(
          other.internalGetContext());
      if (!other.getMultiplexedModelId().isEmpty()) {
        multiplexedModelId_ = other.multiplexedModelId_;
        onChanged();
      }
      if (!other.getRoute().isEmpty()) {
        route_ = other.route_;
        onChanged();
      }
      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.RequestMetadata parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.ray.serve.generated.RequestMetadata) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object requestId_ = "";
    /**
     * string request_id = 1 [json_name = "requestId"];
     * @return The requestId.
     */
    public java.lang.String getRequestId() {
      java.lang.Object ref = requestId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        requestId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string request_id = 1 [json_name = "requestId"];
     * @return The bytes for requestId.
     */
    public com.google.protobuf.ByteString
        getRequestIdBytes() {
      java.lang.Object ref = requestId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        requestId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string request_id = 1 [json_name = "requestId"];
     * @param value The requestId to set.
     * @return This builder for chaining.
     */
    public Builder setRequestId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      requestId_ = value;
      onChanged();
      return this;
    }
    /**
     * string request_id = 1 [json_name = "requestId"];
     * @return This builder for chaining.
     */
    public Builder clearRequestId() {
      
      requestId_ = getDefaultInstance().getRequestId();
      onChanged();
      return this;
    }
    /**
     * string request_id = 1 [json_name = "requestId"];
     * @param value The bytes for requestId to set.
     * @return This builder for chaining.
     */
    public Builder setRequestIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      requestId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object endpoint_ = "";
    /**
     * string endpoint = 2 [json_name = "endpoint"];
     * @return The endpoint.
     */
    public java.lang.String getEndpoint() {
      java.lang.Object ref = endpoint_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        endpoint_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string endpoint = 2 [json_name = "endpoint"];
     * @return The bytes for endpoint.
     */
    public com.google.protobuf.ByteString
        getEndpointBytes() {
      java.lang.Object ref = endpoint_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        endpoint_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string endpoint = 2 [json_name = "endpoint"];
     * @param value The endpoint to set.
     * @return This builder for chaining.
     */
    public Builder setEndpoint(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      endpoint_ = value;
      onChanged();
      return this;
    }
    /**
     * string endpoint = 2 [json_name = "endpoint"];
     * @return This builder for chaining.
     */
    public Builder clearEndpoint() {
      
      endpoint_ = getDefaultInstance().getEndpoint();
      onChanged();
      return this;
    }
    /**
     * string endpoint = 2 [json_name = "endpoint"];
     * @param value The bytes for endpoint to set.
     * @return This builder for chaining.
     */
    public Builder setEndpointBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      endpoint_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object callMethod_ = "";
    /**
     * string call_method = 3 [json_name = "callMethod"];
     * @return The callMethod.
     */
    public java.lang.String getCallMethod() {
      java.lang.Object ref = callMethod_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        callMethod_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string call_method = 3 [json_name = "callMethod"];
     * @return The bytes for callMethod.
     */
    public com.google.protobuf.ByteString
        getCallMethodBytes() {
      java.lang.Object ref = callMethod_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        callMethod_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string call_method = 3 [json_name = "callMethod"];
     * @param value The callMethod to set.
     * @return This builder for chaining.
     */
    public Builder setCallMethod(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      callMethod_ = value;
      onChanged();
      return this;
    }
    /**
     * string call_method = 3 [json_name = "callMethod"];
     * @return This builder for chaining.
     */
    public Builder clearCallMethod() {
      
      callMethod_ = getDefaultInstance().getCallMethod();
      onChanged();
      return this;
    }
    /**
     * string call_method = 3 [json_name = "callMethod"];
     * @param value The bytes for callMethod to set.
     * @return This builder for chaining.
     */
    public Builder setCallMethodBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      callMethod_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> context_;
    private com.google.protobuf.MapField
    internalGetContext() {
      if (context_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ContextDefaultEntryHolder.defaultEntry);
      }
      return context_;
    }
    private com.google.protobuf.MapField
    internalGetMutableContext() {
      onChanged();;
      if (context_ == null) {
        context_ = com.google.protobuf.MapField.newMapField(
            ContextDefaultEntryHolder.defaultEntry);
      }
      if (!context_.isMutable()) {
        context_ = context_.copy();
      }
      return context_;
    }

    public int getContextCount() {
      return internalGetContext().getMap().size();
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */

    @java.lang.Override
    public boolean containsContext(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetContext().getMap().containsKey(key);
    }
    /**
     * Use {@link #getContextMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map getContext() {
      return getContextMap();
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */
    @java.lang.Override

    public java.util.Map getContextMap() {
      return internalGetContext().getMap();
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */
    @java.lang.Override

    public java.lang.String getContextOrDefault(
        java.lang.String key,
        java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetContext().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */
    @java.lang.Override

    public java.lang.String getContextOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetContext().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearContext() {
      internalGetMutableContext().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */

    public Builder removeContext(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableContext().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
    getMutableContext() {
      return internalGetMutableContext().getMutableMap();
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */
    public Builder putContext(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) {
  throw new NullPointerException("map value");
}

      internalGetMutableContext().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * map<string, string> context = 4 [json_name = "context"];
     */

    public Builder putAllContext(
        java.util.Map values) {
      internalGetMutableContext().getMutableMap()
          .putAll(values);
      return this;
    }

    private java.lang.Object multiplexedModelId_ = "";
    /**
     * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
     * @return The multiplexedModelId.
     */
    public java.lang.String getMultiplexedModelId() {
      java.lang.Object ref = multiplexedModelId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        multiplexedModelId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
     * @return The bytes for multiplexedModelId.
     */
    public com.google.protobuf.ByteString
        getMultiplexedModelIdBytes() {
      java.lang.Object ref = multiplexedModelId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        multiplexedModelId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
     * @param value The multiplexedModelId to set.
     * @return This builder for chaining.
     */
    public Builder setMultiplexedModelId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      multiplexedModelId_ = value;
      onChanged();
      return this;
    }
    /**
     * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
     * @return This builder for chaining.
     */
    public Builder clearMultiplexedModelId() {
      
      multiplexedModelId_ = getDefaultInstance().getMultiplexedModelId();
      onChanged();
      return this;
    }
    /**
     * string multiplexed_model_id = 5 [json_name = "multiplexedModelId"];
     * @param value The bytes for multiplexedModelId to set.
     * @return This builder for chaining.
     */
    public Builder setMultiplexedModelIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      multiplexedModelId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object route_ = "";
    /**
     * string route = 6 [json_name = "route"];
     * @return The route.
     */
    public java.lang.String getRoute() {
      java.lang.Object ref = route_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        route_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string route = 6 [json_name = "route"];
     * @return The bytes for route.
     */
    public com.google.protobuf.ByteString
        getRouteBytes() {
      java.lang.Object ref = route_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        route_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string route = 6 [json_name = "route"];
     * @param value The route to set.
     * @return This builder for chaining.
     */
    public Builder setRoute(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      route_ = value;
      onChanged();
      return this;
    }
    /**
     * string route = 6 [json_name = "route"];
     * @return This builder for chaining.
     */
    public Builder clearRoute() {
      
      route_ = getDefaultInstance().getRoute();
      onChanged();
      return this;
    }
    /**
     * string route = 6 [json_name = "route"];
     * @param value The bytes for route to set.
     * @return This builder for chaining.
     */
    public Builder setRouteBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      route_ = value;
      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.RequestMetadata)
  }

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

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

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public RequestMetadata parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new RequestMetadata(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.RequestMetadata getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy