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

com.tencent.polaris.client.pb.LocationGRPCService Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpcapi_location.proto

package com.tencent.polaris.client.pb;

public final class LocationGRPCService {
  private LocationGRPCService() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface LocationRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:v1.LocationRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * string client_ip = 1 [json_name = "client_ip"];
     * @return The clientIp.
     */
    java.lang.String getClientIp();
    /**
     * string client_ip = 1 [json_name = "client_ip"];
     * @return The bytes for clientIp.
     */
    com.google.protobuf.ByteString
        getClientIpBytes();
  }
  /**
   * Protobuf type {@code v1.LocationRequest}
   */
  public static final class LocationRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:v1.LocationRequest)
      LocationRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use LocationRequest.newBuilder() to construct.
    private LocationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
      super(builder);
    }
    private LocationRequest() {
      clientIp_ = "";
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.class, com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.Builder.class);
    }

    public static final int CLIENT_IP_FIELD_NUMBER = 1;
    private volatile java.lang.Object clientIp_;
    /**
     * string client_ip = 1 [json_name = "client_ip"];
     * @return The clientIp.
     */
    @java.lang.Override
    public java.lang.String getClientIp() {
      java.lang.Object ref = clientIp_;
      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();
        clientIp_ = s;
        return s;
      }
    }
    /**
     * string client_ip = 1 [json_name = "client_ip"];
     * @return The bytes for clientIp.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getClientIpBytes() {
      java.lang.Object ref = clientIp_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        clientIp_ = 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(clientIp_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientIp_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientIp_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientIp_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest)) {
        return super.equals(obj);
      }
      com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest other = (com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest) obj;

      if (!getClientIp()
          .equals(other.getClientIp())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CLIENT_IP_FIELD_NUMBER;
      hash = (53 * hash) + getClientIp().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest 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 com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest 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 com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest 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(com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest 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 v1.LocationRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder implements
        // @@protoc_insertion_point(builder_implements:v1.LocationRequest)
        com.tencent.polaris.client.pb.LocationGRPCService.LocationRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.class, com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.Builder.class);
      }

      // Construct using com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.newBuilder()
      private Builder() {

      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);

      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        clientIp_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationRequest_descriptor;
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest getDefaultInstanceForType() {
        return com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.getDefaultInstance();
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest build() {
        com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest buildPartial() {
        com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest result = new com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest(this);
        result.clientIp_ = clientIp_;
        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 com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest) {
          return mergeFrom((com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest other) {
        if (other == com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.getDefaultInstance()) return this;
        if (!other.getClientIp().isEmpty()) {
          clientIp_ = other.clientIp_;
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        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 {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                clientIp_ = input.readStringRequireUtf8();

                break;
              } // case 10
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private java.lang.Object clientIp_ = "";
      /**
       * string client_ip = 1 [json_name = "client_ip"];
       * @return The clientIp.
       */
      public java.lang.String getClientIp() {
        java.lang.Object ref = clientIp_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          clientIp_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * string client_ip = 1 [json_name = "client_ip"];
       * @return The bytes for clientIp.
       */
      public com.google.protobuf.ByteString
          getClientIpBytes() {
        java.lang.Object ref = clientIp_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          clientIp_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * string client_ip = 1 [json_name = "client_ip"];
       * @param value The clientIp to set.
       * @return This builder for chaining.
       */
      public Builder setClientIp(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        clientIp_ = value;
        onChanged();
        return this;
      }
      /**
       * string client_ip = 1 [json_name = "client_ip"];
       * @return This builder for chaining.
       */
      public Builder clearClientIp() {
        
        clientIp_ = getDefaultInstance().getClientIp();
        onChanged();
        return this;
      }
      /**
       * string client_ip = 1 [json_name = "client_ip"];
       * @param value The bytes for clientIp to set.
       * @return This builder for chaining.
       */
      public Builder setClientIpBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        clientIp_ = 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:v1.LocationRequest)
    }

    // @@protoc_insertion_point(class_scope:v1.LocationRequest)
    private static final com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest();
    }

    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public LocationRequest parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

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

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

    @java.lang.Override
    public com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LocationResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:v1.LocationResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * string region = 1;
     * @return The region.
     */
    java.lang.String getRegion();
    /**
     * string region = 1;
     * @return The bytes for region.
     */
    com.google.protobuf.ByteString
        getRegionBytes();

    /**
     * string zone = 2;
     * @return The zone.
     */
    java.lang.String getZone();
    /**
     * string zone = 2;
     * @return The bytes for zone.
     */
    com.google.protobuf.ByteString
        getZoneBytes();

    /**
     * string campus = 3;
     * @return The campus.
     */
    java.lang.String getCampus();
    /**
     * string campus = 3;
     * @return The bytes for campus.
     */
    com.google.protobuf.ByteString
        getCampusBytes();
  }
  /**
   * Protobuf type {@code v1.LocationResponse}
   */
  public static final class LocationResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:v1.LocationResponse)
      LocationResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use LocationResponse.newBuilder() to construct.
    private LocationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
      super(builder);
    }
    private LocationResponse() {
      region_ = "";
      zone_ = "";
      campus_ = "";
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.class, com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.Builder.class);
    }

    public static final int REGION_FIELD_NUMBER = 1;
    private volatile java.lang.Object region_;
    /**
     * string region = 1;
     * @return The region.
     */
    @java.lang.Override
    public java.lang.String getRegion() {
      java.lang.Object ref = region_;
      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();
        region_ = s;
        return s;
      }
    }
    /**
     * string region = 1;
     * @return The bytes for region.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getRegionBytes() {
      java.lang.Object ref = region_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        region_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ZONE_FIELD_NUMBER = 2;
    private volatile java.lang.Object zone_;
    /**
     * string zone = 2;
     * @return The zone.
     */
    @java.lang.Override
    public java.lang.String getZone() {
      java.lang.Object ref = zone_;
      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();
        zone_ = s;
        return s;
      }
    }
    /**
     * string zone = 2;
     * @return The bytes for zone.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getZoneBytes() {
      java.lang.Object ref = zone_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        zone_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CAMPUS_FIELD_NUMBER = 3;
    private volatile java.lang.Object campus_;
    /**
     * string campus = 3;
     * @return The campus.
     */
    @java.lang.Override
    public java.lang.String getCampus() {
      java.lang.Object ref = campus_;
      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();
        campus_ = s;
        return s;
      }
    }
    /**
     * string campus = 3;
     * @return The bytes for campus.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getCampusBytes() {
      java.lang.Object ref = campus_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        campus_ = 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(region_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, region_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(campus_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, campus_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, region_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(campus_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, campus_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse)) {
        return super.equals(obj);
      }
      com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse other = (com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse) obj;

      if (!getRegion()
          .equals(other.getRegion())) return false;
      if (!getZone()
          .equals(other.getZone())) return false;
      if (!getCampus()
          .equals(other.getCampus())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) 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) + REGION_FIELD_NUMBER;
      hash = (53 * hash) + getRegion().hashCode();
      hash = (37 * hash) + ZONE_FIELD_NUMBER;
      hash = (53 * hash) + getZone().hashCode();
      hash = (37 * hash) + CAMPUS_FIELD_NUMBER;
      hash = (53 * hash) + getCampus().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse 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 com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse 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 com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse 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(com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse 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 v1.LocationResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder implements
        // @@protoc_insertion_point(builder_implements:v1.LocationResponse)
        com.tencent.polaris.client.pb.LocationGRPCService.LocationResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.class, com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.Builder.class);
      }

      // Construct using com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.newBuilder()
      private Builder() {

      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);

      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        region_ = "";

        zone_ = "";

        campus_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.tencent.polaris.client.pb.LocationGRPCService.internal_static_v1_LocationResponse_descriptor;
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse getDefaultInstanceForType() {
        return com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.getDefaultInstance();
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse build() {
        com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse buildPartial() {
        com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse result = new com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse(this);
        result.region_ = region_;
        result.zone_ = zone_;
        result.campus_ = campus_;
        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 com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse) {
          return mergeFrom((com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse other) {
        if (other == com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.getDefaultInstance()) return this;
        if (!other.getRegion().isEmpty()) {
          region_ = other.region_;
          onChanged();
        }
        if (!other.getZone().isEmpty()) {
          zone_ = other.zone_;
          onChanged();
        }
        if (!other.getCampus().isEmpty()) {
          campus_ = other.campus_;
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        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 {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                region_ = input.readStringRequireUtf8();

                break;
              } // case 10
              case 18: {
                zone_ = input.readStringRequireUtf8();

                break;
              } // case 18
              case 26: {
                campus_ = input.readStringRequireUtf8();

                break;
              } // case 26
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private java.lang.Object region_ = "";
      /**
       * string region = 1;
       * @return The region.
       */
      public java.lang.String getRegion() {
        java.lang.Object ref = region_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          region_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * string region = 1;
       * @return The bytes for region.
       */
      public com.google.protobuf.ByteString
          getRegionBytes() {
        java.lang.Object ref = region_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          region_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * string region = 1;
       * @param value The region to set.
       * @return This builder for chaining.
       */
      public Builder setRegion(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        region_ = value;
        onChanged();
        return this;
      }
      /**
       * string region = 1;
       * @return This builder for chaining.
       */
      public Builder clearRegion() {
        
        region_ = getDefaultInstance().getRegion();
        onChanged();
        return this;
      }
      /**
       * string region = 1;
       * @param value The bytes for region to set.
       * @return This builder for chaining.
       */
      public Builder setRegionBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        region_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object zone_ = "";
      /**
       * string zone = 2;
       * @return The zone.
       */
      public java.lang.String getZone() {
        java.lang.Object ref = zone_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          zone_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * string zone = 2;
       * @return The bytes for zone.
       */
      public com.google.protobuf.ByteString
          getZoneBytes() {
        java.lang.Object ref = zone_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          zone_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * string zone = 2;
       * @param value The zone to set.
       * @return This builder for chaining.
       */
      public Builder setZone(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        zone_ = value;
        onChanged();
        return this;
      }
      /**
       * string zone = 2;
       * @return This builder for chaining.
       */
      public Builder clearZone() {
        
        zone_ = getDefaultInstance().getZone();
        onChanged();
        return this;
      }
      /**
       * string zone = 2;
       * @param value The bytes for zone to set.
       * @return This builder for chaining.
       */
      public Builder setZoneBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        zone_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object campus_ = "";
      /**
       * string campus = 3;
       * @return The campus.
       */
      public java.lang.String getCampus() {
        java.lang.Object ref = campus_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          campus_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * string campus = 3;
       * @return The bytes for campus.
       */
      public com.google.protobuf.ByteString
          getCampusBytes() {
        java.lang.Object ref = campus_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          campus_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * string campus = 3;
       * @param value The campus to set.
       * @return This builder for chaining.
       */
      public Builder setCampus(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        campus_ = value;
        onChanged();
        return this;
      }
      /**
       * string campus = 3;
       * @return This builder for chaining.
       */
      public Builder clearCampus() {
        
        campus_ = getDefaultInstance().getCampus();
        onChanged();
        return this;
      }
      /**
       * string campus = 3;
       * @param value The bytes for campus to set.
       * @return This builder for chaining.
       */
      public Builder setCampusBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        campus_ = 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:v1.LocationResponse)
    }

    // @@protoc_insertion_point(class_scope:v1.LocationResponse)
    private static final com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse();
    }

    public static com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public LocationResponse parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

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

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

    @java.lang.Override
    public com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_v1_LocationRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_v1_LocationRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_v1_LocationResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_v1_LocationResponse_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\026grpcapi_location.proto\022\002v1\"/\n\017Location" +
      "Request\022\034\n\tclient_ip\030\001 \001(\tR\tclient_ip\"@\n" +
      "\020LocationResponse\022\016\n\006region\030\001 \001(\t\022\014\n\004zon" +
      "e\030\002 \001(\t\022\016\n\006campus\030\003 \001(\t2J\n\014LocationGRPC\022" +
      ":\n\013GetLocation\022\023.v1.LocationRequest\032\024.v1" +
      ".LocationResponse\"\000B4\n\035com.tencent.polar" +
      "is.client.pbB\023LocationGRPCServiceb\006proto" +
      "3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_v1_LocationRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_v1_LocationRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_v1_LocationRequest_descriptor,
        new java.lang.String[] { "ClientIp", });
    internal_static_v1_LocationResponse_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_v1_LocationResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_v1_LocationResponse_descriptor,
        new java.lang.String[] { "Region", "Zone", "Campus", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy