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

shade.polaris.io.grpc.lb.v1.LoadBalanceResponse Maven / Gradle / Ivy

There is a newer version: 2.0.0.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpc/lb/v1/load_balancer.proto

package io.grpc.lb.v1;

/**
 * Protobuf type {@code grpc.lb.v1.LoadBalanceResponse}
 */
public final class LoadBalanceResponse extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:grpc.lb.v1.LoadBalanceResponse)
    LoadBalanceResponseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use LoadBalanceResponse.newBuilder() to construct.
  private LoadBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private LoadBalanceResponse() {
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grpc.lb.v1.LoadBalanceResponse.class, io.grpc.lb.v1.LoadBalanceResponse.Builder.class);
  }

  private int loadBalanceResponseTypeCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object loadBalanceResponseType_;
  public enum LoadBalanceResponseTypeCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    INITIAL_RESPONSE(1),
    SERVER_LIST(2),
    FALLBACK_RESPONSE(3),
    LOADBALANCERESPONSETYPE_NOT_SET(0);
    private final int value;
    private LoadBalanceResponseTypeCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static LoadBalanceResponseTypeCase valueOf(int value) {
      return forNumber(value);
    }

    public static LoadBalanceResponseTypeCase forNumber(int value) {
      switch (value) {
        case 1: return INITIAL_RESPONSE;
        case 2: return SERVER_LIST;
        case 3: return FALLBACK_RESPONSE;
        case 0: return LOADBALANCERESPONSETYPE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public LoadBalanceResponseTypeCase
  getLoadBalanceResponseTypeCase() {
    return LoadBalanceResponseTypeCase.forNumber(
        loadBalanceResponseTypeCase_);
  }

  public static final int INITIAL_RESPONSE_FIELD_NUMBER = 1;
  /**
   * 
   * This message should be sent on the first response to the client.
   * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; * @return Whether the initialResponse field is set. */ @java.lang.Override public boolean hasInitialResponse() { return loadBalanceResponseTypeCase_ == 1; } /** *
   * This message should be sent on the first response to the client.
   * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; * @return The initialResponse. */ @java.lang.Override public io.grpc.lb.v1.InitialLoadBalanceResponse getInitialResponse() { if (loadBalanceResponseTypeCase_ == 1) { return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } /** *
   * This message should be sent on the first response to the client.
   * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ @java.lang.Override public io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { if (loadBalanceResponseTypeCase_ == 1) { return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } public static final int SERVER_LIST_FIELD_NUMBER = 2; /** *
   * Contains the list of servers selected by the load balancer. The client
   * should send requests to these servers in the specified order.
   * 
* * .grpc.lb.v1.ServerList server_list = 2; * @return Whether the serverList field is set. */ @java.lang.Override public boolean hasServerList() { return loadBalanceResponseTypeCase_ == 2; } /** *
   * Contains the list of servers selected by the load balancer. The client
   * should send requests to these servers in the specified order.
   * 
* * .grpc.lb.v1.ServerList server_list = 2; * @return The serverList. */ @java.lang.Override public io.grpc.lb.v1.ServerList getServerList() { if (loadBalanceResponseTypeCase_ == 2) { return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; } return io.grpc.lb.v1.ServerList.getDefaultInstance(); } /** *
   * Contains the list of servers selected by the load balancer. The client
   * should send requests to these servers in the specified order.
   * 
* * .grpc.lb.v1.ServerList server_list = 2; */ @java.lang.Override public io.grpc.lb.v1.ServerListOrBuilder getServerListOrBuilder() { if (loadBalanceResponseTypeCase_ == 2) { return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; } return io.grpc.lb.v1.ServerList.getDefaultInstance(); } public static final int FALLBACK_RESPONSE_FIELD_NUMBER = 3; /** *
   * If this field is set, then the client should eagerly enter fallback
   * mode (even if there are existing, healthy connections to backends).
   * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; * @return Whether the fallbackResponse field is set. */ @java.lang.Override public boolean hasFallbackResponse() { return loadBalanceResponseTypeCase_ == 3; } /** *
   * If this field is set, then the client should eagerly enter fallback
   * mode (even if there are existing, healthy connections to backends).
   * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; * @return The fallbackResponse. */ @java.lang.Override public io.grpc.lb.v1.FallbackResponse getFallbackResponse() { if (loadBalanceResponseTypeCase_ == 3) { return (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } /** *
   * If this field is set, then the client should eagerly enter fallback
   * mode (even if there are existing, healthy connections to backends).
   * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ @java.lang.Override public io.grpc.lb.v1.FallbackResponseOrBuilder getFallbackResponseOrBuilder() { if (loadBalanceResponseTypeCase_ == 3) { return (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } 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 (loadBalanceResponseTypeCase_ == 1) { output.writeMessage(1, (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_); } if (loadBalanceResponseTypeCase_ == 2) { output.writeMessage(2, (io.grpc.lb.v1.ServerList) loadBalanceResponseType_); } if (loadBalanceResponseTypeCase_ == 3) { output.writeMessage(3, (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (loadBalanceResponseTypeCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_); } if (loadBalanceResponseTypeCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (io.grpc.lb.v1.ServerList) loadBalanceResponseType_); } if (loadBalanceResponseTypeCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_); } 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 io.grpc.lb.v1.LoadBalanceResponse)) { return super.equals(obj); } io.grpc.lb.v1.LoadBalanceResponse other = (io.grpc.lb.v1.LoadBalanceResponse) obj; if (!getLoadBalanceResponseTypeCase().equals(other.getLoadBalanceResponseTypeCase())) return false; switch (loadBalanceResponseTypeCase_) { case 1: if (!getInitialResponse() .equals(other.getInitialResponse())) return false; break; case 2: if (!getServerList() .equals(other.getServerList())) return false; break; case 3: if (!getFallbackResponse() .equals(other.getFallbackResponse())) return false; break; case 0: default: } 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(); switch (loadBalanceResponseTypeCase_) { case 1: hash = (37 * hash) + INITIAL_RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getInitialResponse().hashCode(); break; case 2: hash = (37 * hash) + SERVER_LIST_FIELD_NUMBER; hash = (53 * hash) + getServerList().hashCode(); break; case 3: hash = (37 * hash) + FALLBACK_RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getFallbackResponse().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lb.v1.LoadBalanceResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.lb.v1.LoadBalanceResponse 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.grpc.lb.v1.LoadBalanceResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.lb.v1.LoadBalanceResponse 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.grpc.lb.v1.LoadBalanceResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.lb.v1.LoadBalanceResponse 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.grpc.lb.v1.LoadBalanceResponse 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 grpc.lb.v1.LoadBalanceResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.lb.v1.LoadBalanceResponse) io.grpc.lb.v1.LoadBalanceResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.lb.v1.LoadBalanceResponse.class, io.grpc.lb.v1.LoadBalanceResponse.Builder.class); } // Construct using io.grpc.lb.v1.LoadBalanceResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (initialResponseBuilder_ != null) { initialResponseBuilder_.clear(); } if (serverListBuilder_ != null) { serverListBuilder_.clear(); } if (fallbackResponseBuilder_ != null) { fallbackResponseBuilder_.clear(); } loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; } @java.lang.Override public io.grpc.lb.v1.LoadBalanceResponse getDefaultInstanceForType() { return io.grpc.lb.v1.LoadBalanceResponse.getDefaultInstance(); } @java.lang.Override public io.grpc.lb.v1.LoadBalanceResponse build() { io.grpc.lb.v1.LoadBalanceResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.lb.v1.LoadBalanceResponse buildPartial() { io.grpc.lb.v1.LoadBalanceResponse result = new io.grpc.lb.v1.LoadBalanceResponse(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(io.grpc.lb.v1.LoadBalanceResponse result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs(io.grpc.lb.v1.LoadBalanceResponse result) { result.loadBalanceResponseTypeCase_ = loadBalanceResponseTypeCase_; result.loadBalanceResponseType_ = this.loadBalanceResponseType_; if (loadBalanceResponseTypeCase_ == 1 && initialResponseBuilder_ != null) { result.loadBalanceResponseType_ = initialResponseBuilder_.build(); } if (loadBalanceResponseTypeCase_ == 2 && serverListBuilder_ != null) { result.loadBalanceResponseType_ = serverListBuilder_.build(); } if (loadBalanceResponseTypeCase_ == 3 && fallbackResponseBuilder_ != null) { result.loadBalanceResponseType_ = fallbackResponseBuilder_.build(); } } @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.grpc.lb.v1.LoadBalanceResponse) { return mergeFrom((io.grpc.lb.v1.LoadBalanceResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.lb.v1.LoadBalanceResponse other) { if (other == io.grpc.lb.v1.LoadBalanceResponse.getDefaultInstance()) return this; switch (other.getLoadBalanceResponseTypeCase()) { case INITIAL_RESPONSE: { mergeInitialResponse(other.getInitialResponse()); break; } case SERVER_LIST: { mergeServerList(other.getServerList()); break; } case FALLBACK_RESPONSE: { mergeFallbackResponse(other.getFallbackResponse()); break; } case LOADBALANCERESPONSETYPE_NOT_SET: { break; } } 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: { input.readMessage( getInitialResponseFieldBuilder().getBuilder(), extensionRegistry); loadBalanceResponseTypeCase_ = 1; break; } // case 10 case 18: { input.readMessage( getServerListFieldBuilder().getBuilder(), extensionRegistry); loadBalanceResponseTypeCase_ = 2; break; } // case 18 case 26: { input.readMessage( getFallbackResponseFieldBuilder().getBuilder(), extensionRegistry); loadBalanceResponseTypeCase_ = 3; 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 int loadBalanceResponseTypeCase_ = 0; private java.lang.Object loadBalanceResponseType_; public LoadBalanceResponseTypeCase getLoadBalanceResponseTypeCase() { return LoadBalanceResponseTypeCase.forNumber( loadBalanceResponseTypeCase_); } public Builder clearLoadBalanceResponseType() { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder> initialResponseBuilder_; /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; * @return Whether the initialResponse field is set. */ @java.lang.Override public boolean hasInitialResponse() { return loadBalanceResponseTypeCase_ == 1; } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; * @return The initialResponse. */ @java.lang.Override public io.grpc.lb.v1.InitialLoadBalanceResponse getInitialResponse() { if (initialResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 1) { return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } else { if (loadBalanceResponseTypeCase_ == 1) { return initialResponseBuilder_.getMessage(); } return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ public Builder setInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value) { if (initialResponseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } loadBalanceResponseType_ = value; onChanged(); } else { initialResponseBuilder_.setMessage(value); } loadBalanceResponseTypeCase_ = 1; return this; } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ public Builder setInitialResponse( io.grpc.lb.v1.InitialLoadBalanceResponse.Builder builderForValue) { if (initialResponseBuilder_ == null) { loadBalanceResponseType_ = builderForValue.build(); onChanged(); } else { initialResponseBuilder_.setMessage(builderForValue.build()); } loadBalanceResponseTypeCase_ = 1; return this; } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ public Builder mergeInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value) { if (initialResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 1 && loadBalanceResponseType_ != io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance()) { loadBalanceResponseType_ = io.grpc.lb.v1.InitialLoadBalanceResponse.newBuilder((io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_) .mergeFrom(value).buildPartial(); } else { loadBalanceResponseType_ = value; } onChanged(); } else { if (loadBalanceResponseTypeCase_ == 1) { initialResponseBuilder_.mergeFrom(value); } else { initialResponseBuilder_.setMessage(value); } } loadBalanceResponseTypeCase_ = 1; return this; } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ public Builder clearInitialResponse() { if (initialResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 1) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; onChanged(); } } else { if (loadBalanceResponseTypeCase_ == 1) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; } initialResponseBuilder_.clear(); } return this; } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ public io.grpc.lb.v1.InitialLoadBalanceResponse.Builder getInitialResponseBuilder() { return getInitialResponseFieldBuilder().getBuilder(); } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ @java.lang.Override public io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { if ((loadBalanceResponseTypeCase_ == 1) && (initialResponseBuilder_ != null)) { return initialResponseBuilder_.getMessageOrBuilder(); } else { if (loadBalanceResponseTypeCase_ == 1) { return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } } /** *
     * This message should be sent on the first response to the client.
     * 
* * .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder> getInitialResponseFieldBuilder() { if (initialResponseBuilder_ == null) { if (!(loadBalanceResponseTypeCase_ == 1)) { loadBalanceResponseType_ = io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); } initialResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder>( (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_, getParentForChildren(), isClean()); loadBalanceResponseType_ = null; } loadBalanceResponseTypeCase_ = 1; onChanged(); return initialResponseBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder> serverListBuilder_; /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; * @return Whether the serverList field is set. */ @java.lang.Override public boolean hasServerList() { return loadBalanceResponseTypeCase_ == 2; } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; * @return The serverList. */ @java.lang.Override public io.grpc.lb.v1.ServerList getServerList() { if (serverListBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 2) { return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; } return io.grpc.lb.v1.ServerList.getDefaultInstance(); } else { if (loadBalanceResponseTypeCase_ == 2) { return serverListBuilder_.getMessage(); } return io.grpc.lb.v1.ServerList.getDefaultInstance(); } } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ public Builder setServerList(io.grpc.lb.v1.ServerList value) { if (serverListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } loadBalanceResponseType_ = value; onChanged(); } else { serverListBuilder_.setMessage(value); } loadBalanceResponseTypeCase_ = 2; return this; } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ public Builder setServerList( io.grpc.lb.v1.ServerList.Builder builderForValue) { if (serverListBuilder_ == null) { loadBalanceResponseType_ = builderForValue.build(); onChanged(); } else { serverListBuilder_.setMessage(builderForValue.build()); } loadBalanceResponseTypeCase_ = 2; return this; } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ public Builder mergeServerList(io.grpc.lb.v1.ServerList value) { if (serverListBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 2 && loadBalanceResponseType_ != io.grpc.lb.v1.ServerList.getDefaultInstance()) { loadBalanceResponseType_ = io.grpc.lb.v1.ServerList.newBuilder((io.grpc.lb.v1.ServerList) loadBalanceResponseType_) .mergeFrom(value).buildPartial(); } else { loadBalanceResponseType_ = value; } onChanged(); } else { if (loadBalanceResponseTypeCase_ == 2) { serverListBuilder_.mergeFrom(value); } else { serverListBuilder_.setMessage(value); } } loadBalanceResponseTypeCase_ = 2; return this; } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ public Builder clearServerList() { if (serverListBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 2) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; onChanged(); } } else { if (loadBalanceResponseTypeCase_ == 2) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; } serverListBuilder_.clear(); } return this; } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ public io.grpc.lb.v1.ServerList.Builder getServerListBuilder() { return getServerListFieldBuilder().getBuilder(); } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ @java.lang.Override public io.grpc.lb.v1.ServerListOrBuilder getServerListOrBuilder() { if ((loadBalanceResponseTypeCase_ == 2) && (serverListBuilder_ != null)) { return serverListBuilder_.getMessageOrBuilder(); } else { if (loadBalanceResponseTypeCase_ == 2) { return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; } return io.grpc.lb.v1.ServerList.getDefaultInstance(); } } /** *
     * Contains the list of servers selected by the load balancer. The client
     * should send requests to these servers in the specified order.
     * 
* * .grpc.lb.v1.ServerList server_list = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder> getServerListFieldBuilder() { if (serverListBuilder_ == null) { if (!(loadBalanceResponseTypeCase_ == 2)) { loadBalanceResponseType_ = io.grpc.lb.v1.ServerList.getDefaultInstance(); } serverListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder>( (io.grpc.lb.v1.ServerList) loadBalanceResponseType_, getParentForChildren(), isClean()); loadBalanceResponseType_ = null; } loadBalanceResponseTypeCase_ = 2; onChanged(); return serverListBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.FallbackResponse, io.grpc.lb.v1.FallbackResponse.Builder, io.grpc.lb.v1.FallbackResponseOrBuilder> fallbackResponseBuilder_; /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; * @return Whether the fallbackResponse field is set. */ @java.lang.Override public boolean hasFallbackResponse() { return loadBalanceResponseTypeCase_ == 3; } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; * @return The fallbackResponse. */ @java.lang.Override public io.grpc.lb.v1.FallbackResponse getFallbackResponse() { if (fallbackResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 3) { return (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } else { if (loadBalanceResponseTypeCase_ == 3) { return fallbackResponseBuilder_.getMessage(); } return io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ public Builder setFallbackResponse(io.grpc.lb.v1.FallbackResponse value) { if (fallbackResponseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } loadBalanceResponseType_ = value; onChanged(); } else { fallbackResponseBuilder_.setMessage(value); } loadBalanceResponseTypeCase_ = 3; return this; } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ public Builder setFallbackResponse( io.grpc.lb.v1.FallbackResponse.Builder builderForValue) { if (fallbackResponseBuilder_ == null) { loadBalanceResponseType_ = builderForValue.build(); onChanged(); } else { fallbackResponseBuilder_.setMessage(builderForValue.build()); } loadBalanceResponseTypeCase_ = 3; return this; } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ public Builder mergeFallbackResponse(io.grpc.lb.v1.FallbackResponse value) { if (fallbackResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 3 && loadBalanceResponseType_ != io.grpc.lb.v1.FallbackResponse.getDefaultInstance()) { loadBalanceResponseType_ = io.grpc.lb.v1.FallbackResponse.newBuilder((io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_) .mergeFrom(value).buildPartial(); } else { loadBalanceResponseType_ = value; } onChanged(); } else { if (loadBalanceResponseTypeCase_ == 3) { fallbackResponseBuilder_.mergeFrom(value); } else { fallbackResponseBuilder_.setMessage(value); } } loadBalanceResponseTypeCase_ = 3; return this; } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ public Builder clearFallbackResponse() { if (fallbackResponseBuilder_ == null) { if (loadBalanceResponseTypeCase_ == 3) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; onChanged(); } } else { if (loadBalanceResponseTypeCase_ == 3) { loadBalanceResponseTypeCase_ = 0; loadBalanceResponseType_ = null; } fallbackResponseBuilder_.clear(); } return this; } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ public io.grpc.lb.v1.FallbackResponse.Builder getFallbackResponseBuilder() { return getFallbackResponseFieldBuilder().getBuilder(); } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ @java.lang.Override public io.grpc.lb.v1.FallbackResponseOrBuilder getFallbackResponseOrBuilder() { if ((loadBalanceResponseTypeCase_ == 3) && (fallbackResponseBuilder_ != null)) { return fallbackResponseBuilder_.getMessageOrBuilder(); } else { if (loadBalanceResponseTypeCase_ == 3) { return (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_; } return io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } } /** *
     * If this field is set, then the client should eagerly enter fallback
     * mode (even if there are existing, healthy connections to backends).
     * 
* * .grpc.lb.v1.FallbackResponse fallback_response = 3; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.FallbackResponse, io.grpc.lb.v1.FallbackResponse.Builder, io.grpc.lb.v1.FallbackResponseOrBuilder> getFallbackResponseFieldBuilder() { if (fallbackResponseBuilder_ == null) { if (!(loadBalanceResponseTypeCase_ == 3)) { loadBalanceResponseType_ = io.grpc.lb.v1.FallbackResponse.getDefaultInstance(); } fallbackResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.lb.v1.FallbackResponse, io.grpc.lb.v1.FallbackResponse.Builder, io.grpc.lb.v1.FallbackResponseOrBuilder>( (io.grpc.lb.v1.FallbackResponse) loadBalanceResponseType_, getParentForChildren(), isClean()); loadBalanceResponseType_ = null; } loadBalanceResponseTypeCase_ = 3; onChanged(); return fallbackResponseBuilder_; } @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:grpc.lb.v1.LoadBalanceResponse) } // @@protoc_insertion_point(class_scope:grpc.lb.v1.LoadBalanceResponse) private static final io.grpc.lb.v1.LoadBalanceResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.lb.v1.LoadBalanceResponse(); } public static io.grpc.lb.v1.LoadBalanceResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LoadBalanceResponse 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 io.grpc.lb.v1.LoadBalanceResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy