Home | History | Annotate | Download | only in v1
      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  * Protobuf type {@code grpc.lb.v1.InitialLoadBalanceRequest}
      8  */
      9 public  final class InitialLoadBalanceRequest extends
     10     com.google.protobuf.GeneratedMessageV3 implements
     11     // @@protoc_insertion_point(message_implements:grpc.lb.v1.InitialLoadBalanceRequest)
     12     InitialLoadBalanceRequestOrBuilder {
     13 private static final long serialVersionUID = 0L;
     14   // Use InitialLoadBalanceRequest.newBuilder() to construct.
     15   private InitialLoadBalanceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
     16     super(builder);
     17   }
     18   private InitialLoadBalanceRequest() {
     19     name_ = "";
     20   }
     21 
     22   @java.lang.Override
     23   public final com.google.protobuf.UnknownFieldSet
     24   getUnknownFields() {
     25     return this.unknownFields;
     26   }
     27   private InitialLoadBalanceRequest(
     28       com.google.protobuf.CodedInputStream input,
     29       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     30       throws com.google.protobuf.InvalidProtocolBufferException {
     31     this();
     32     if (extensionRegistry == null) {
     33       throw new java.lang.NullPointerException();
     34     }
     35     int mutable_bitField0_ = 0;
     36     com.google.protobuf.UnknownFieldSet.Builder unknownFields =
     37         com.google.protobuf.UnknownFieldSet.newBuilder();
     38     try {
     39       boolean done = false;
     40       while (!done) {
     41         int tag = input.readTag();
     42         switch (tag) {
     43           case 0:
     44             done = true;
     45             break;
     46           default: {
     47             if (!parseUnknownFieldProto3(
     48                 input, unknownFields, extensionRegistry, tag)) {
     49               done = true;
     50             }
     51             break;
     52           }
     53           case 10: {
     54             java.lang.String s = input.readStringRequireUtf8();
     55 
     56             name_ = s;
     57             break;
     58           }
     59         }
     60       }
     61     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
     62       throw e.setUnfinishedMessage(this);
     63     } catch (java.io.IOException e) {
     64       throw new com.google.protobuf.InvalidProtocolBufferException(
     65           e).setUnfinishedMessage(this);
     66     } finally {
     67       this.unknownFields = unknownFields.build();
     68       makeExtensionsImmutable();
     69     }
     70   }
     71   public static final com.google.protobuf.Descriptors.Descriptor
     72       getDescriptor() {
     73     return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_InitialLoadBalanceRequest_descriptor;
     74   }
     75 
     76   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     77       internalGetFieldAccessorTable() {
     78     return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_InitialLoadBalanceRequest_fieldAccessorTable
     79         .ensureFieldAccessorsInitialized(
     80             io.grpc.lb.v1.InitialLoadBalanceRequest.class, io.grpc.lb.v1.InitialLoadBalanceRequest.Builder.class);
     81   }
     82 
     83   public static final int NAME_FIELD_NUMBER = 1;
     84   private volatile java.lang.Object name_;
     85   /**
     86    * <pre>
     87    * The name of the load balanced service (e.g., service.googleapis.com). Its
     88    * length should be less than 256 bytes.
     89    * The name might include a port number. How to handle the port number is up
     90    * to the balancer.
     91    * </pre>
     92    *
     93    * <code>string name = 1;</code>
     94    */
     95   public java.lang.String getName() {
     96     java.lang.Object ref = name_;
     97     if (ref instanceof java.lang.String) {
     98       return (java.lang.String) ref;
     99     } else {
    100       com.google.protobuf.ByteString bs =
    101           (com.google.protobuf.ByteString) ref;
    102       java.lang.String s = bs.toStringUtf8();
    103       name_ = s;
    104       return s;
    105     }
    106   }
    107   /**
    108    * <pre>
    109    * The name of the load balanced service (e.g., service.googleapis.com). Its
    110    * length should be less than 256 bytes.
    111    * The name might include a port number. How to handle the port number is up
    112    * to the balancer.
    113    * </pre>
    114    *
    115    * <code>string name = 1;</code>
    116    */
    117   public com.google.protobuf.ByteString
    118       getNameBytes() {
    119     java.lang.Object ref = name_;
    120     if (ref instanceof java.lang.String) {
    121       com.google.protobuf.ByteString b =
    122           com.google.protobuf.ByteString.copyFromUtf8(
    123               (java.lang.String) ref);
    124       name_ = b;
    125       return b;
    126     } else {
    127       return (com.google.protobuf.ByteString) ref;
    128     }
    129   }
    130 
    131   private byte memoizedIsInitialized = -1;
    132   public final boolean isInitialized() {
    133     byte isInitialized = memoizedIsInitialized;
    134     if (isInitialized == 1) return true;
    135     if (isInitialized == 0) return false;
    136 
    137     memoizedIsInitialized = 1;
    138     return true;
    139   }
    140 
    141   public void writeTo(com.google.protobuf.CodedOutputStream output)
    142                       throws java.io.IOException {
    143     if (!getNameBytes().isEmpty()) {
    144       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    145     }
    146     unknownFields.writeTo(output);
    147   }
    148 
    149   public int getSerializedSize() {
    150     int size = memoizedSize;
    151     if (size != -1) return size;
    152 
    153     size = 0;
    154     if (!getNameBytes().isEmpty()) {
    155       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    156     }
    157     size += unknownFields.getSerializedSize();
    158     memoizedSize = size;
    159     return size;
    160   }
    161 
    162   @java.lang.Override
    163   public boolean equals(final java.lang.Object obj) {
    164     if (obj == this) {
    165      return true;
    166     }
    167     if (!(obj instanceof io.grpc.lb.v1.InitialLoadBalanceRequest)) {
    168       return super.equals(obj);
    169     }
    170     io.grpc.lb.v1.InitialLoadBalanceRequest other = (io.grpc.lb.v1.InitialLoadBalanceRequest) obj;
    171 
    172     boolean result = true;
    173     result = result && getName()
    174         .equals(other.getName());
    175     result = result && unknownFields.equals(other.unknownFields);
    176     return result;
    177   }
    178 
    179   @java.lang.Override
    180   public int hashCode() {
    181     if (memoizedHashCode != 0) {
    182       return memoizedHashCode;
    183     }
    184     int hash = 41;
    185     hash = (19 * hash) + getDescriptor().hashCode();
    186     hash = (37 * hash) + NAME_FIELD_NUMBER;
    187     hash = (53 * hash) + getName().hashCode();
    188     hash = (29 * hash) + unknownFields.hashCode();
    189     memoizedHashCode = hash;
    190     return hash;
    191   }
    192 
    193   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    194       java.nio.ByteBuffer data)
    195       throws com.google.protobuf.InvalidProtocolBufferException {
    196     return PARSER.parseFrom(data);
    197   }
    198   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    199       java.nio.ByteBuffer data,
    200       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    201       throws com.google.protobuf.InvalidProtocolBufferException {
    202     return PARSER.parseFrom(data, extensionRegistry);
    203   }
    204   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    205       com.google.protobuf.ByteString data)
    206       throws com.google.protobuf.InvalidProtocolBufferException {
    207     return PARSER.parseFrom(data);
    208   }
    209   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    210       com.google.protobuf.ByteString data,
    211       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    212       throws com.google.protobuf.InvalidProtocolBufferException {
    213     return PARSER.parseFrom(data, extensionRegistry);
    214   }
    215   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(byte[] data)
    216       throws com.google.protobuf.InvalidProtocolBufferException {
    217     return PARSER.parseFrom(data);
    218   }
    219   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    220       byte[] data,
    221       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    222       throws com.google.protobuf.InvalidProtocolBufferException {
    223     return PARSER.parseFrom(data, extensionRegistry);
    224   }
    225   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(java.io.InputStream input)
    226       throws java.io.IOException {
    227     return com.google.protobuf.GeneratedMessageV3
    228         .parseWithIOException(PARSER, input);
    229   }
    230   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    231       java.io.InputStream input,
    232       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    233       throws java.io.IOException {
    234     return com.google.protobuf.GeneratedMessageV3
    235         .parseWithIOException(PARSER, input, extensionRegistry);
    236   }
    237   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseDelimitedFrom(java.io.InputStream input)
    238       throws java.io.IOException {
    239     return com.google.protobuf.GeneratedMessageV3
    240         .parseDelimitedWithIOException(PARSER, input);
    241   }
    242   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseDelimitedFrom(
    243       java.io.InputStream input,
    244       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    245       throws java.io.IOException {
    246     return com.google.protobuf.GeneratedMessageV3
    247         .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    248   }
    249   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    250       com.google.protobuf.CodedInputStream input)
    251       throws java.io.IOException {
    252     return com.google.protobuf.GeneratedMessageV3
    253         .parseWithIOException(PARSER, input);
    254   }
    255   public static io.grpc.lb.v1.InitialLoadBalanceRequest parseFrom(
    256       com.google.protobuf.CodedInputStream input,
    257       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    258       throws java.io.IOException {
    259     return com.google.protobuf.GeneratedMessageV3
    260         .parseWithIOException(PARSER, input, extensionRegistry);
    261   }
    262 
    263   public Builder newBuilderForType() { return newBuilder(); }
    264   public static Builder newBuilder() {
    265     return DEFAULT_INSTANCE.toBuilder();
    266   }
    267   public static Builder newBuilder(io.grpc.lb.v1.InitialLoadBalanceRequest prototype) {
    268     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    269   }
    270   public Builder toBuilder() {
    271     return this == DEFAULT_INSTANCE
    272         ? new Builder() : new Builder().mergeFrom(this);
    273   }
    274 
    275   @java.lang.Override
    276   protected Builder newBuilderForType(
    277       com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    278     Builder builder = new Builder(parent);
    279     return builder;
    280   }
    281   /**
    282    * Protobuf type {@code grpc.lb.v1.InitialLoadBalanceRequest}
    283    */
    284   public static final class Builder extends
    285       com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
    286       // @@protoc_insertion_point(builder_implements:grpc.lb.v1.InitialLoadBalanceRequest)
    287       io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder {
    288     public static final com.google.protobuf.Descriptors.Descriptor
    289         getDescriptor() {
    290       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_InitialLoadBalanceRequest_descriptor;
    291     }
    292 
    293     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    294         internalGetFieldAccessorTable() {
    295       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_InitialLoadBalanceRequest_fieldAccessorTable
    296           .ensureFieldAccessorsInitialized(
    297               io.grpc.lb.v1.InitialLoadBalanceRequest.class, io.grpc.lb.v1.InitialLoadBalanceRequest.Builder.class);
    298     }
    299 
    300     // Construct using io.grpc.lb.v1.InitialLoadBalanceRequest.newBuilder()
    301     private Builder() {
    302       maybeForceBuilderInitialization();
    303     }
    304 
    305     private Builder(
    306         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    307       super(parent);
    308       maybeForceBuilderInitialization();
    309     }
    310     private void maybeForceBuilderInitialization() {
    311       if (com.google.protobuf.GeneratedMessageV3
    312               .alwaysUseFieldBuilders) {
    313       }
    314     }
    315     public Builder clear() {
    316       super.clear();
    317       name_ = "";
    318 
    319       return this;
    320     }
    321 
    322     public com.google.protobuf.Descriptors.Descriptor
    323         getDescriptorForType() {
    324       return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_InitialLoadBalanceRequest_descriptor;
    325     }
    326 
    327     public io.grpc.lb.v1.InitialLoadBalanceRequest getDefaultInstanceForType() {
    328       return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
    329     }
    330 
    331     public io.grpc.lb.v1.InitialLoadBalanceRequest build() {
    332       io.grpc.lb.v1.InitialLoadBalanceRequest result = buildPartial();
    333       if (!result.isInitialized()) {
    334         throw newUninitializedMessageException(result);
    335       }
    336       return result;
    337     }
    338 
    339     public io.grpc.lb.v1.InitialLoadBalanceRequest buildPartial() {
    340       io.grpc.lb.v1.InitialLoadBalanceRequest result = new io.grpc.lb.v1.InitialLoadBalanceRequest(this);
    341       result.name_ = name_;
    342       onBuilt();
    343       return result;
    344     }
    345 
    346     public Builder clone() {
    347       return (Builder) super.clone();
    348     }
    349     public Builder setField(
    350         com.google.protobuf.Descriptors.FieldDescriptor field,
    351         java.lang.Object value) {
    352       return (Builder) super.setField(field, value);
    353     }
    354     public Builder clearField(
    355         com.google.protobuf.Descriptors.FieldDescriptor field) {
    356       return (Builder) super.clearField(field);
    357     }
    358     public Builder clearOneof(
    359         com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    360       return (Builder) super.clearOneof(oneof);
    361     }
    362     public Builder setRepeatedField(
    363         com.google.protobuf.Descriptors.FieldDescriptor field,
    364         int index, java.lang.Object value) {
    365       return (Builder) super.setRepeatedField(field, index, value);
    366     }
    367     public Builder addRepeatedField(
    368         com.google.protobuf.Descriptors.FieldDescriptor field,
    369         java.lang.Object value) {
    370       return (Builder) super.addRepeatedField(field, value);
    371     }
    372     public Builder mergeFrom(com.google.protobuf.Message other) {
    373       if (other instanceof io.grpc.lb.v1.InitialLoadBalanceRequest) {
    374         return mergeFrom((io.grpc.lb.v1.InitialLoadBalanceRequest)other);
    375       } else {
    376         super.mergeFrom(other);
    377         return this;
    378       }
    379     }
    380 
    381     public Builder mergeFrom(io.grpc.lb.v1.InitialLoadBalanceRequest other) {
    382       if (other == io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance()) return this;
    383       if (!other.getName().isEmpty()) {
    384         name_ = other.name_;
    385         onChanged();
    386       }
    387       this.mergeUnknownFields(other.unknownFields);
    388       onChanged();
    389       return this;
    390     }
    391 
    392     public final boolean isInitialized() {
    393       return true;
    394     }
    395 
    396     public Builder mergeFrom(
    397         com.google.protobuf.CodedInputStream input,
    398         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    399         throws java.io.IOException {
    400       io.grpc.lb.v1.InitialLoadBalanceRequest parsedMessage = null;
    401       try {
    402         parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    403       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    404         parsedMessage = (io.grpc.lb.v1.InitialLoadBalanceRequest) e.getUnfinishedMessage();
    405         throw e.unwrapIOException();
    406       } finally {
    407         if (parsedMessage != null) {
    408           mergeFrom(parsedMessage);
    409         }
    410       }
    411       return this;
    412     }
    413 
    414     private java.lang.Object name_ = "";
    415     /**
    416      * <pre>
    417      * The name of the load balanced service (e.g., service.googleapis.com). Its
    418      * length should be less than 256 bytes.
    419      * The name might include a port number. How to handle the port number is up
    420      * to the balancer.
    421      * </pre>
    422      *
    423      * <code>string name = 1;</code>
    424      */
    425     public java.lang.String getName() {
    426       java.lang.Object ref = name_;
    427       if (!(ref instanceof java.lang.String)) {
    428         com.google.protobuf.ByteString bs =
    429             (com.google.protobuf.ByteString) ref;
    430         java.lang.String s = bs.toStringUtf8();
    431         name_ = s;
    432         return s;
    433       } else {
    434         return (java.lang.String) ref;
    435       }
    436     }
    437     /**
    438      * <pre>
    439      * The name of the load balanced service (e.g., service.googleapis.com). Its
    440      * length should be less than 256 bytes.
    441      * The name might include a port number. How to handle the port number is up
    442      * to the balancer.
    443      * </pre>
    444      *
    445      * <code>string name = 1;</code>
    446      */
    447     public com.google.protobuf.ByteString
    448         getNameBytes() {
    449       java.lang.Object ref = name_;
    450       if (ref instanceof String) {
    451         com.google.protobuf.ByteString b =
    452             com.google.protobuf.ByteString.copyFromUtf8(
    453                 (java.lang.String) ref);
    454         name_ = b;
    455         return b;
    456       } else {
    457         return (com.google.protobuf.ByteString) ref;
    458       }
    459     }
    460     /**
    461      * <pre>
    462      * The name of the load balanced service (e.g., service.googleapis.com). Its
    463      * length should be less than 256 bytes.
    464      * The name might include a port number. How to handle the port number is up
    465      * to the balancer.
    466      * </pre>
    467      *
    468      * <code>string name = 1;</code>
    469      */
    470     public Builder setName(
    471         java.lang.String value) {
    472       if (value == null) {
    473     throw new NullPointerException();
    474   }
    475 
    476       name_ = value;
    477       onChanged();
    478       return this;
    479     }
    480     /**
    481      * <pre>
    482      * The name of the load balanced service (e.g., service.googleapis.com). Its
    483      * length should be less than 256 bytes.
    484      * The name might include a port number. How to handle the port number is up
    485      * to the balancer.
    486      * </pre>
    487      *
    488      * <code>string name = 1;</code>
    489      */
    490     public Builder clearName() {
    491 
    492       name_ = getDefaultInstance().getName();
    493       onChanged();
    494       return this;
    495     }
    496     /**
    497      * <pre>
    498      * The name of the load balanced service (e.g., service.googleapis.com). Its
    499      * length should be less than 256 bytes.
    500      * The name might include a port number. How to handle the port number is up
    501      * to the balancer.
    502      * </pre>
    503      *
    504      * <code>string name = 1;</code>
    505      */
    506     public Builder setNameBytes(
    507         com.google.protobuf.ByteString value) {
    508       if (value == null) {
    509     throw new NullPointerException();
    510   }
    511   checkByteStringIsUtf8(value);
    512 
    513       name_ = value;
    514       onChanged();
    515       return this;
    516     }
    517     public final Builder setUnknownFields(
    518         final com.google.protobuf.UnknownFieldSet unknownFields) {
    519       return super.setUnknownFieldsProto3(unknownFields);
    520     }
    521 
    522     public final Builder mergeUnknownFields(
    523         final com.google.protobuf.UnknownFieldSet unknownFields) {
    524       return super.mergeUnknownFields(unknownFields);
    525     }
    526 
    527 
    528     // @@protoc_insertion_point(builder_scope:grpc.lb.v1.InitialLoadBalanceRequest)
    529   }
    530 
    531   // @@protoc_insertion_point(class_scope:grpc.lb.v1.InitialLoadBalanceRequest)
    532   private static final io.grpc.lb.v1.InitialLoadBalanceRequest DEFAULT_INSTANCE;
    533   static {
    534     DEFAULT_INSTANCE = new io.grpc.lb.v1.InitialLoadBalanceRequest();
    535   }
    536 
    537   public static io.grpc.lb.v1.InitialLoadBalanceRequest getDefaultInstance() {
    538     return DEFAULT_INSTANCE;
    539   }
    540 
    541   private static final com.google.protobuf.Parser<InitialLoadBalanceRequest>
    542       PARSER = new com.google.protobuf.AbstractParser<InitialLoadBalanceRequest>() {
    543     public InitialLoadBalanceRequest parsePartialFrom(
    544         com.google.protobuf.CodedInputStream input,
    545         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    546         throws com.google.protobuf.InvalidProtocolBufferException {
    547       return new InitialLoadBalanceRequest(input, extensionRegistry);
    548     }
    549   };
    550 
    551   public static com.google.protobuf.Parser<InitialLoadBalanceRequest> parser() {
    552     return PARSER;
    553   }
    554 
    555   @java.lang.Override
    556   public com.google.protobuf.Parser<InitialLoadBalanceRequest> getParserForType() {
    557     return PARSER;
    558   }
    559 
    560   public io.grpc.lb.v1.InitialLoadBalanceRequest getDefaultInstanceForType() {
    561     return DEFAULT_INSTANCE;
    562   }
    563 
    564 }
    565 
    566