• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: grpc/lb/v1/load_balancer.proto
3 
4 package io.grpc.lb.v1;
5 
6 /**
7  * <pre>
8  * Contains server information. When the drop field is not true, use the other
9  * fields.
10  * </pre>
11  *
12  * Protobuf type {@code grpc.lb.v1.Server}
13  */
14 public  final class Server extends
15     com.google.protobuf.GeneratedMessageV3 implements
16     // @@protoc_insertion_point(message_implements:grpc.lb.v1.Server)
17     ServerOrBuilder {
18 private static final long serialVersionUID = 0L;
19   // Use Server.newBuilder() to construct.
Server(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)20   private Server(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
21     super(builder);
22   }
Server()23   private Server() {
24     ipAddress_ = com.google.protobuf.ByteString.EMPTY;
25     port_ = 0;
26     loadBalanceToken_ = "";
27     drop_ = false;
28   }
29 
30   @java.lang.Override
31   public final com.google.protobuf.UnknownFieldSet
getUnknownFields()32   getUnknownFields() {
33     return this.unknownFields;
34   }
Server( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)35   private Server(
36       com.google.protobuf.CodedInputStream input,
37       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
38       throws com.google.protobuf.InvalidProtocolBufferException {
39     this();
40     if (extensionRegistry == null) {
41       throw new java.lang.NullPointerException();
42     }
43     int mutable_bitField0_ = 0;
44     com.google.protobuf.UnknownFieldSet.Builder unknownFields =
45         com.google.protobuf.UnknownFieldSet.newBuilder();
46     try {
47       boolean done = false;
48       while (!done) {
49         int tag = input.readTag();
50         switch (tag) {
51           case 0:
52             done = true;
53             break;
54           default: {
55             if (!parseUnknownFieldProto3(
56                 input, unknownFields, extensionRegistry, tag)) {
57               done = true;
58             }
59             break;
60           }
61           case 10: {
62 
63             ipAddress_ = input.readBytes();
64             break;
65           }
66           case 16: {
67 
68             port_ = input.readInt32();
69             break;
70           }
71           case 26: {
72             java.lang.String s = input.readStringRequireUtf8();
73 
74             loadBalanceToken_ = s;
75             break;
76           }
77           case 32: {
78 
79             drop_ = input.readBool();
80             break;
81           }
82         }
83       }
84     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
85       throw e.setUnfinishedMessage(this);
86     } catch (java.io.IOException e) {
87       throw new com.google.protobuf.InvalidProtocolBufferException(
88           e).setUnfinishedMessage(this);
89     } finally {
90       this.unknownFields = unknownFields.build();
91       makeExtensionsImmutable();
92     }
93   }
94   public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor()95       getDescriptor() {
96     return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_Server_descriptor;
97   }
98 
99   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()100       internalGetFieldAccessorTable() {
101     return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_Server_fieldAccessorTable
102         .ensureFieldAccessorsInitialized(
103             io.grpc.lb.v1.Server.class, io.grpc.lb.v1.Server.Builder.class);
104   }
105 
106   public static final int IP_ADDRESS_FIELD_NUMBER = 1;
107   private com.google.protobuf.ByteString ipAddress_;
108   /**
109    * <pre>
110    * A resolved address for the server, serialized in network-byte-order. It may
111    * either be an IPv4 or IPv6 address.
112    * </pre>
113    *
114    * <code>bytes ip_address = 1;</code>
115    */
getIpAddress()116   public com.google.protobuf.ByteString getIpAddress() {
117     return ipAddress_;
118   }
119 
120   public static final int PORT_FIELD_NUMBER = 2;
121   private int port_;
122   /**
123    * <pre>
124    * A resolved port number for the server.
125    * </pre>
126    *
127    * <code>int32 port = 2;</code>
128    */
getPort()129   public int getPort() {
130     return port_;
131   }
132 
133   public static final int LOAD_BALANCE_TOKEN_FIELD_NUMBER = 3;
134   private volatile java.lang.Object loadBalanceToken_;
135   /**
136    * <pre>
137    * An opaque but printable token for load reporting. The client must include
138    * the token of the picked server into the initial metadata when it starts a
139    * call to that server. The token is used by the server to verify the request
140    * and to allow the server to report load to the gRPC LB system. The token is
141    * also used in client stats for reporting dropped calls.
142    * Its length can be variable but must be less than 50 bytes.
143    * </pre>
144    *
145    * <code>string load_balance_token = 3;</code>
146    */
getLoadBalanceToken()147   public java.lang.String getLoadBalanceToken() {
148     java.lang.Object ref = loadBalanceToken_;
149     if (ref instanceof java.lang.String) {
150       return (java.lang.String) ref;
151     } else {
152       com.google.protobuf.ByteString bs =
153           (com.google.protobuf.ByteString) ref;
154       java.lang.String s = bs.toStringUtf8();
155       loadBalanceToken_ = s;
156       return s;
157     }
158   }
159   /**
160    * <pre>
161    * An opaque but printable token for load reporting. The client must include
162    * the token of the picked server into the initial metadata when it starts a
163    * call to that server. The token is used by the server to verify the request
164    * and to allow the server to report load to the gRPC LB system. The token is
165    * also used in client stats for reporting dropped calls.
166    * Its length can be variable but must be less than 50 bytes.
167    * </pre>
168    *
169    * <code>string load_balance_token = 3;</code>
170    */
171   public com.google.protobuf.ByteString
getLoadBalanceTokenBytes()172       getLoadBalanceTokenBytes() {
173     java.lang.Object ref = loadBalanceToken_;
174     if (ref instanceof java.lang.String) {
175       com.google.protobuf.ByteString b =
176           com.google.protobuf.ByteString.copyFromUtf8(
177               (java.lang.String) ref);
178       loadBalanceToken_ = b;
179       return b;
180     } else {
181       return (com.google.protobuf.ByteString) ref;
182     }
183   }
184 
185   public static final int DROP_FIELD_NUMBER = 4;
186   private boolean drop_;
187   /**
188    * <pre>
189    * Indicates whether this particular request should be dropped by the client.
190    * If the request is dropped, there will be a corresponding entry in
191    * ClientStats.calls_finished_with_drop.
192    * </pre>
193    *
194    * <code>bool drop = 4;</code>
195    */
getDrop()196   public boolean getDrop() {
197     return drop_;
198   }
199 
200   private byte memoizedIsInitialized = -1;
isInitialized()201   public final boolean isInitialized() {
202     byte isInitialized = memoizedIsInitialized;
203     if (isInitialized == 1) return true;
204     if (isInitialized == 0) return false;
205 
206     memoizedIsInitialized = 1;
207     return true;
208   }
209 
writeTo(com.google.protobuf.CodedOutputStream output)210   public void writeTo(com.google.protobuf.CodedOutputStream output)
211                       throws java.io.IOException {
212     if (!ipAddress_.isEmpty()) {
213       output.writeBytes(1, ipAddress_);
214     }
215     if (port_ != 0) {
216       output.writeInt32(2, port_);
217     }
218     if (!getLoadBalanceTokenBytes().isEmpty()) {
219       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, loadBalanceToken_);
220     }
221     if (drop_ != false) {
222       output.writeBool(4, drop_);
223     }
224     unknownFields.writeTo(output);
225   }
226 
getSerializedSize()227   public int getSerializedSize() {
228     int size = memoizedSize;
229     if (size != -1) return size;
230 
231     size = 0;
232     if (!ipAddress_.isEmpty()) {
233       size += com.google.protobuf.CodedOutputStream
234         .computeBytesSize(1, ipAddress_);
235     }
236     if (port_ != 0) {
237       size += com.google.protobuf.CodedOutputStream
238         .computeInt32Size(2, port_);
239     }
240     if (!getLoadBalanceTokenBytes().isEmpty()) {
241       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, loadBalanceToken_);
242     }
243     if (drop_ != false) {
244       size += com.google.protobuf.CodedOutputStream
245         .computeBoolSize(4, drop_);
246     }
247     size += unknownFields.getSerializedSize();
248     memoizedSize = size;
249     return size;
250   }
251 
252   @java.lang.Override
equals(final java.lang.Object obj)253   public boolean equals(final java.lang.Object obj) {
254     if (obj == this) {
255      return true;
256     }
257     if (!(obj instanceof io.grpc.lb.v1.Server)) {
258       return super.equals(obj);
259     }
260     io.grpc.lb.v1.Server other = (io.grpc.lb.v1.Server) obj;
261 
262     boolean result = true;
263     result = result && getIpAddress()
264         .equals(other.getIpAddress());
265     result = result && (getPort()
266         == other.getPort());
267     result = result && getLoadBalanceToken()
268         .equals(other.getLoadBalanceToken());
269     result = result && (getDrop()
270         == other.getDrop());
271     result = result && unknownFields.equals(other.unknownFields);
272     return result;
273   }
274 
275   @java.lang.Override
hashCode()276   public int hashCode() {
277     if (memoizedHashCode != 0) {
278       return memoizedHashCode;
279     }
280     int hash = 41;
281     hash = (19 * hash) + getDescriptor().hashCode();
282     hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
283     hash = (53 * hash) + getIpAddress().hashCode();
284     hash = (37 * hash) + PORT_FIELD_NUMBER;
285     hash = (53 * hash) + getPort();
286     hash = (37 * hash) + LOAD_BALANCE_TOKEN_FIELD_NUMBER;
287     hash = (53 * hash) + getLoadBalanceToken().hashCode();
288     hash = (37 * hash) + DROP_FIELD_NUMBER;
289     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
290         getDrop());
291     hash = (29 * hash) + unknownFields.hashCode();
292     memoizedHashCode = hash;
293     return hash;
294   }
295 
parseFrom( java.nio.ByteBuffer data)296   public static io.grpc.lb.v1.Server parseFrom(
297       java.nio.ByteBuffer data)
298       throws com.google.protobuf.InvalidProtocolBufferException {
299     return PARSER.parseFrom(data);
300   }
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)301   public static io.grpc.lb.v1.Server parseFrom(
302       java.nio.ByteBuffer data,
303       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304       throws com.google.protobuf.InvalidProtocolBufferException {
305     return PARSER.parseFrom(data, extensionRegistry);
306   }
parseFrom( com.google.protobuf.ByteString data)307   public static io.grpc.lb.v1.Server parseFrom(
308       com.google.protobuf.ByteString data)
309       throws com.google.protobuf.InvalidProtocolBufferException {
310     return PARSER.parseFrom(data);
311   }
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)312   public static io.grpc.lb.v1.Server parseFrom(
313       com.google.protobuf.ByteString data,
314       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
315       throws com.google.protobuf.InvalidProtocolBufferException {
316     return PARSER.parseFrom(data, extensionRegistry);
317   }
parseFrom(byte[] data)318   public static io.grpc.lb.v1.Server parseFrom(byte[] data)
319       throws com.google.protobuf.InvalidProtocolBufferException {
320     return PARSER.parseFrom(data);
321   }
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)322   public static io.grpc.lb.v1.Server parseFrom(
323       byte[] data,
324       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
325       throws com.google.protobuf.InvalidProtocolBufferException {
326     return PARSER.parseFrom(data, extensionRegistry);
327   }
parseFrom(java.io.InputStream input)328   public static io.grpc.lb.v1.Server parseFrom(java.io.InputStream input)
329       throws java.io.IOException {
330     return com.google.protobuf.GeneratedMessageV3
331         .parseWithIOException(PARSER, input);
332   }
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)333   public static io.grpc.lb.v1.Server parseFrom(
334       java.io.InputStream input,
335       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
336       throws java.io.IOException {
337     return com.google.protobuf.GeneratedMessageV3
338         .parseWithIOException(PARSER, input, extensionRegistry);
339   }
parseDelimitedFrom(java.io.InputStream input)340   public static io.grpc.lb.v1.Server parseDelimitedFrom(java.io.InputStream input)
341       throws java.io.IOException {
342     return com.google.protobuf.GeneratedMessageV3
343         .parseDelimitedWithIOException(PARSER, input);
344   }
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)345   public static io.grpc.lb.v1.Server parseDelimitedFrom(
346       java.io.InputStream input,
347       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
348       throws java.io.IOException {
349     return com.google.protobuf.GeneratedMessageV3
350         .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
351   }
parseFrom( com.google.protobuf.CodedInputStream input)352   public static io.grpc.lb.v1.Server parseFrom(
353       com.google.protobuf.CodedInputStream input)
354       throws java.io.IOException {
355     return com.google.protobuf.GeneratedMessageV3
356         .parseWithIOException(PARSER, input);
357   }
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)358   public static io.grpc.lb.v1.Server parseFrom(
359       com.google.protobuf.CodedInputStream input,
360       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
361       throws java.io.IOException {
362     return com.google.protobuf.GeneratedMessageV3
363         .parseWithIOException(PARSER, input, extensionRegistry);
364   }
365 
newBuilderForType()366   public Builder newBuilderForType() { return newBuilder(); }
newBuilder()367   public static Builder newBuilder() {
368     return DEFAULT_INSTANCE.toBuilder();
369   }
newBuilder(io.grpc.lb.v1.Server prototype)370   public static Builder newBuilder(io.grpc.lb.v1.Server prototype) {
371     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
372   }
toBuilder()373   public Builder toBuilder() {
374     return this == DEFAULT_INSTANCE
375         ? new Builder() : new Builder().mergeFrom(this);
376   }
377 
378   @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)379   protected Builder newBuilderForType(
380       com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
381     Builder builder = new Builder(parent);
382     return builder;
383   }
384   /**
385    * <pre>
386    * Contains server information. When the drop field is not true, use the other
387    * fields.
388    * </pre>
389    *
390    * Protobuf type {@code grpc.lb.v1.Server}
391    */
392   public static final class Builder extends
393       com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
394       // @@protoc_insertion_point(builder_implements:grpc.lb.v1.Server)
395       io.grpc.lb.v1.ServerOrBuilder {
396     public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor()397         getDescriptor() {
398       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_Server_descriptor;
399     }
400 
401     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()402         internalGetFieldAccessorTable() {
403       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_Server_fieldAccessorTable
404           .ensureFieldAccessorsInitialized(
405               io.grpc.lb.v1.Server.class, io.grpc.lb.v1.Server.Builder.class);
406     }
407 
408     // Construct using io.grpc.lb.v1.Server.newBuilder()
Builder()409     private Builder() {
410       maybeForceBuilderInitialization();
411     }
412 
Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)413     private Builder(
414         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
415       super(parent);
416       maybeForceBuilderInitialization();
417     }
maybeForceBuilderInitialization()418     private void maybeForceBuilderInitialization() {
419       if (com.google.protobuf.GeneratedMessageV3
420               .alwaysUseFieldBuilders) {
421       }
422     }
clear()423     public Builder clear() {
424       super.clear();
425       ipAddress_ = com.google.protobuf.ByteString.EMPTY;
426 
427       port_ = 0;
428 
429       loadBalanceToken_ = "";
430 
431       drop_ = false;
432 
433       return this;
434     }
435 
436     public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()437         getDescriptorForType() {
438       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_Server_descriptor;
439     }
440 
getDefaultInstanceForType()441     public io.grpc.lb.v1.Server getDefaultInstanceForType() {
442       return io.grpc.lb.v1.Server.getDefaultInstance();
443     }
444 
build()445     public io.grpc.lb.v1.Server build() {
446       io.grpc.lb.v1.Server result = buildPartial();
447       if (!result.isInitialized()) {
448         throw newUninitializedMessageException(result);
449       }
450       return result;
451     }
452 
buildPartial()453     public io.grpc.lb.v1.Server buildPartial() {
454       io.grpc.lb.v1.Server result = new io.grpc.lb.v1.Server(this);
455       result.ipAddress_ = ipAddress_;
456       result.port_ = port_;
457       result.loadBalanceToken_ = loadBalanceToken_;
458       result.drop_ = drop_;
459       onBuilt();
460       return result;
461     }
462 
clone()463     public Builder clone() {
464       return (Builder) super.clone();
465     }
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)466     public Builder setField(
467         com.google.protobuf.Descriptors.FieldDescriptor field,
468         java.lang.Object value) {
469       return (Builder) super.setField(field, value);
470     }
clearField( com.google.protobuf.Descriptors.FieldDescriptor field)471     public Builder clearField(
472         com.google.protobuf.Descriptors.FieldDescriptor field) {
473       return (Builder) super.clearField(field);
474     }
clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof)475     public Builder clearOneof(
476         com.google.protobuf.Descriptors.OneofDescriptor oneof) {
477       return (Builder) super.clearOneof(oneof);
478     }
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)479     public Builder setRepeatedField(
480         com.google.protobuf.Descriptors.FieldDescriptor field,
481         int index, java.lang.Object value) {
482       return (Builder) super.setRepeatedField(field, index, value);
483     }
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)484     public Builder addRepeatedField(
485         com.google.protobuf.Descriptors.FieldDescriptor field,
486         java.lang.Object value) {
487       return (Builder) super.addRepeatedField(field, value);
488     }
mergeFrom(com.google.protobuf.Message other)489     public Builder mergeFrom(com.google.protobuf.Message other) {
490       if (other instanceof io.grpc.lb.v1.Server) {
491         return mergeFrom((io.grpc.lb.v1.Server)other);
492       } else {
493         super.mergeFrom(other);
494         return this;
495       }
496     }
497 
mergeFrom(io.grpc.lb.v1.Server other)498     public Builder mergeFrom(io.grpc.lb.v1.Server other) {
499       if (other == io.grpc.lb.v1.Server.getDefaultInstance()) return this;
500       if (other.getIpAddress() != com.google.protobuf.ByteString.EMPTY) {
501         setIpAddress(other.getIpAddress());
502       }
503       if (other.getPort() != 0) {
504         setPort(other.getPort());
505       }
506       if (!other.getLoadBalanceToken().isEmpty()) {
507         loadBalanceToken_ = other.loadBalanceToken_;
508         onChanged();
509       }
510       if (other.getDrop() != false) {
511         setDrop(other.getDrop());
512       }
513       this.mergeUnknownFields(other.unknownFields);
514       onChanged();
515       return this;
516     }
517 
isInitialized()518     public final boolean isInitialized() {
519       return true;
520     }
521 
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)522     public Builder mergeFrom(
523         com.google.protobuf.CodedInputStream input,
524         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525         throws java.io.IOException {
526       io.grpc.lb.v1.Server parsedMessage = null;
527       try {
528         parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
529       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
530         parsedMessage = (io.grpc.lb.v1.Server) e.getUnfinishedMessage();
531         throw e.unwrapIOException();
532       } finally {
533         if (parsedMessage != null) {
534           mergeFrom(parsedMessage);
535         }
536       }
537       return this;
538     }
539 
540     private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY;
541     /**
542      * <pre>
543      * A resolved address for the server, serialized in network-byte-order. It may
544      * either be an IPv4 or IPv6 address.
545      * </pre>
546      *
547      * <code>bytes ip_address = 1;</code>
548      */
getIpAddress()549     public com.google.protobuf.ByteString getIpAddress() {
550       return ipAddress_;
551     }
552     /**
553      * <pre>
554      * A resolved address for the server, serialized in network-byte-order. It may
555      * either be an IPv4 or IPv6 address.
556      * </pre>
557      *
558      * <code>bytes ip_address = 1;</code>
559      */
setIpAddress(com.google.protobuf.ByteString value)560     public Builder setIpAddress(com.google.protobuf.ByteString value) {
561       if (value == null) {
562     throw new NullPointerException();
563   }
564 
565       ipAddress_ = value;
566       onChanged();
567       return this;
568     }
569     /**
570      * <pre>
571      * A resolved address for the server, serialized in network-byte-order. It may
572      * either be an IPv4 or IPv6 address.
573      * </pre>
574      *
575      * <code>bytes ip_address = 1;</code>
576      */
clearIpAddress()577     public Builder clearIpAddress() {
578 
579       ipAddress_ = getDefaultInstance().getIpAddress();
580       onChanged();
581       return this;
582     }
583 
584     private int port_ ;
585     /**
586      * <pre>
587      * A resolved port number for the server.
588      * </pre>
589      *
590      * <code>int32 port = 2;</code>
591      */
getPort()592     public int getPort() {
593       return port_;
594     }
595     /**
596      * <pre>
597      * A resolved port number for the server.
598      * </pre>
599      *
600      * <code>int32 port = 2;</code>
601      */
setPort(int value)602     public Builder setPort(int value) {
603 
604       port_ = value;
605       onChanged();
606       return this;
607     }
608     /**
609      * <pre>
610      * A resolved port number for the server.
611      * </pre>
612      *
613      * <code>int32 port = 2;</code>
614      */
clearPort()615     public Builder clearPort() {
616 
617       port_ = 0;
618       onChanged();
619       return this;
620     }
621 
622     private java.lang.Object loadBalanceToken_ = "";
623     /**
624      * <pre>
625      * An opaque but printable token for load reporting. The client must include
626      * the token of the picked server into the initial metadata when it starts a
627      * call to that server. The token is used by the server to verify the request
628      * and to allow the server to report load to the gRPC LB system. The token is
629      * also used in client stats for reporting dropped calls.
630      * Its length can be variable but must be less than 50 bytes.
631      * </pre>
632      *
633      * <code>string load_balance_token = 3;</code>
634      */
getLoadBalanceToken()635     public java.lang.String getLoadBalanceToken() {
636       java.lang.Object ref = loadBalanceToken_;
637       if (!(ref instanceof java.lang.String)) {
638         com.google.protobuf.ByteString bs =
639             (com.google.protobuf.ByteString) ref;
640         java.lang.String s = bs.toStringUtf8();
641         loadBalanceToken_ = s;
642         return s;
643       } else {
644         return (java.lang.String) ref;
645       }
646     }
647     /**
648      * <pre>
649      * An opaque but printable token for load reporting. The client must include
650      * the token of the picked server into the initial metadata when it starts a
651      * call to that server. The token is used by the server to verify the request
652      * and to allow the server to report load to the gRPC LB system. The token is
653      * also used in client stats for reporting dropped calls.
654      * Its length can be variable but must be less than 50 bytes.
655      * </pre>
656      *
657      * <code>string load_balance_token = 3;</code>
658      */
659     public com.google.protobuf.ByteString
getLoadBalanceTokenBytes()660         getLoadBalanceTokenBytes() {
661       java.lang.Object ref = loadBalanceToken_;
662       if (ref instanceof String) {
663         com.google.protobuf.ByteString b =
664             com.google.protobuf.ByteString.copyFromUtf8(
665                 (java.lang.String) ref);
666         loadBalanceToken_ = b;
667         return b;
668       } else {
669         return (com.google.protobuf.ByteString) ref;
670       }
671     }
672     /**
673      * <pre>
674      * An opaque but printable token for load reporting. The client must include
675      * the token of the picked server into the initial metadata when it starts a
676      * call to that server. The token is used by the server to verify the request
677      * and to allow the server to report load to the gRPC LB system. The token is
678      * also used in client stats for reporting dropped calls.
679      * Its length can be variable but must be less than 50 bytes.
680      * </pre>
681      *
682      * <code>string load_balance_token = 3;</code>
683      */
setLoadBalanceToken( java.lang.String value)684     public Builder setLoadBalanceToken(
685         java.lang.String value) {
686       if (value == null) {
687     throw new NullPointerException();
688   }
689 
690       loadBalanceToken_ = value;
691       onChanged();
692       return this;
693     }
694     /**
695      * <pre>
696      * An opaque but printable token for load reporting. The client must include
697      * the token of the picked server into the initial metadata when it starts a
698      * call to that server. The token is used by the server to verify the request
699      * and to allow the server to report load to the gRPC LB system. The token is
700      * also used in client stats for reporting dropped calls.
701      * Its length can be variable but must be less than 50 bytes.
702      * </pre>
703      *
704      * <code>string load_balance_token = 3;</code>
705      */
clearLoadBalanceToken()706     public Builder clearLoadBalanceToken() {
707 
708       loadBalanceToken_ = getDefaultInstance().getLoadBalanceToken();
709       onChanged();
710       return this;
711     }
712     /**
713      * <pre>
714      * An opaque but printable token for load reporting. The client must include
715      * the token of the picked server into the initial metadata when it starts a
716      * call to that server. The token is used by the server to verify the request
717      * and to allow the server to report load to the gRPC LB system. The token is
718      * also used in client stats for reporting dropped calls.
719      * Its length can be variable but must be less than 50 bytes.
720      * </pre>
721      *
722      * <code>string load_balance_token = 3;</code>
723      */
setLoadBalanceTokenBytes( com.google.protobuf.ByteString value)724     public Builder setLoadBalanceTokenBytes(
725         com.google.protobuf.ByteString value) {
726       if (value == null) {
727     throw new NullPointerException();
728   }
729   checkByteStringIsUtf8(value);
730 
731       loadBalanceToken_ = value;
732       onChanged();
733       return this;
734     }
735 
736     private boolean drop_ ;
737     /**
738      * <pre>
739      * Indicates whether this particular request should be dropped by the client.
740      * If the request is dropped, there will be a corresponding entry in
741      * ClientStats.calls_finished_with_drop.
742      * </pre>
743      *
744      * <code>bool drop = 4;</code>
745      */
getDrop()746     public boolean getDrop() {
747       return drop_;
748     }
749     /**
750      * <pre>
751      * Indicates whether this particular request should be dropped by the client.
752      * If the request is dropped, there will be a corresponding entry in
753      * ClientStats.calls_finished_with_drop.
754      * </pre>
755      *
756      * <code>bool drop = 4;</code>
757      */
setDrop(boolean value)758     public Builder setDrop(boolean value) {
759 
760       drop_ = value;
761       onChanged();
762       return this;
763     }
764     /**
765      * <pre>
766      * Indicates whether this particular request should be dropped by the client.
767      * If the request is dropped, there will be a corresponding entry in
768      * ClientStats.calls_finished_with_drop.
769      * </pre>
770      *
771      * <code>bool drop = 4;</code>
772      */
clearDrop()773     public Builder clearDrop() {
774 
775       drop_ = false;
776       onChanged();
777       return this;
778     }
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)779     public final Builder setUnknownFields(
780         final com.google.protobuf.UnknownFieldSet unknownFields) {
781       return super.setUnknownFieldsProto3(unknownFields);
782     }
783 
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)784     public final Builder mergeUnknownFields(
785         final com.google.protobuf.UnknownFieldSet unknownFields) {
786       return super.mergeUnknownFields(unknownFields);
787     }
788 
789 
790     // @@protoc_insertion_point(builder_scope:grpc.lb.v1.Server)
791   }
792 
793   // @@protoc_insertion_point(class_scope:grpc.lb.v1.Server)
794   private static final io.grpc.lb.v1.Server DEFAULT_INSTANCE;
795   static {
796     DEFAULT_INSTANCE = new io.grpc.lb.v1.Server();
797   }
798 
getDefaultInstance()799   public static io.grpc.lb.v1.Server getDefaultInstance() {
800     return DEFAULT_INSTANCE;
801   }
802 
803   private static final com.google.protobuf.Parser<Server>
804       PARSER = new com.google.protobuf.AbstractParser<Server>() {
805     public Server parsePartialFrom(
806         com.google.protobuf.CodedInputStream input,
807         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
808         throws com.google.protobuf.InvalidProtocolBufferException {
809       return new Server(input, extensionRegistry);
810     }
811   };
812 
parser()813   public static com.google.protobuf.Parser<Server> parser() {
814     return PARSER;
815   }
816 
817   @java.lang.Override
getParserForType()818   public com.google.protobuf.Parser<Server> getParserForType() {
819     return PARSER;
820   }
821 
getDefaultInstanceForType()822   public io.grpc.lb.v1.Server getDefaultInstanceForType() {
823     return DEFAULT_INSTANCE;
824   }
825 
826 }
827 
828