Home | History | Annotate | Download | only in v1alpha
      1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
      2 // source: grpc/binlog/v1alpha/binarylog.proto
      3 
      4 package io.grpc.binarylog.v1alpha;
      5 
      6 /**
      7  * <pre>
      8  * Message payload, used by REQUEST and RESPONSE
      9  * </pre>
     10  *
     11  * Protobuf type {@code grpc.binarylog.v1alpha.Message}
     12  */
     13 public  final class Message extends
     14     com.google.protobuf.GeneratedMessageV3 implements
     15     // @@protoc_insertion_point(message_implements:grpc.binarylog.v1alpha.Message)
     16     MessageOrBuilder {
     17 private static final long serialVersionUID = 0L;
     18   // Use Message.newBuilder() to construct.
     19   private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
     20     super(builder);
     21   }
     22   private Message() {
     23     flags_ = 0;
     24     length_ = 0;
     25     data_ = com.google.protobuf.ByteString.EMPTY;
     26   }
     27 
     28   @java.lang.Override
     29   public final com.google.protobuf.UnknownFieldSet
     30   getUnknownFields() {
     31     return this.unknownFields;
     32   }
     33   private Message(
     34       com.google.protobuf.CodedInputStream input,
     35       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     36       throws com.google.protobuf.InvalidProtocolBufferException {
     37     this();
     38     if (extensionRegistry == null) {
     39       throw new java.lang.NullPointerException();
     40     }
     41     int mutable_bitField0_ = 0;
     42     com.google.protobuf.UnknownFieldSet.Builder unknownFields =
     43         com.google.protobuf.UnknownFieldSet.newBuilder();
     44     try {
     45       boolean done = false;
     46       while (!done) {
     47         int tag = input.readTag();
     48         switch (tag) {
     49           case 0:
     50             done = true;
     51             break;
     52           default: {
     53             if (!parseUnknownFieldProto3(
     54                 input, unknownFields, extensionRegistry, tag)) {
     55               done = true;
     56             }
     57             break;
     58           }
     59           case 8: {
     60 
     61             flags_ = input.readUInt32();
     62             break;
     63           }
     64           case 16: {
     65 
     66             length_ = input.readUInt32();
     67             break;
     68           }
     69           case 26: {
     70 
     71             data_ = input.readBytes();
     72             break;
     73           }
     74         }
     75       }
     76     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
     77       throw e.setUnfinishedMessage(this);
     78     } catch (java.io.IOException e) {
     79       throw new com.google.protobuf.InvalidProtocolBufferException(
     80           e).setUnfinishedMessage(this);
     81     } finally {
     82       this.unknownFields = unknownFields.build();
     83       makeExtensionsImmutable();
     84     }
     85   }
     86   public static final com.google.protobuf.Descriptors.Descriptor
     87       getDescriptor() {
     88     return io.grpc.binarylog.v1alpha.BinaryLogProto.internal_static_grpc_binarylog_v1alpha_Message_descriptor;
     89   }
     90 
     91   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     92       internalGetFieldAccessorTable() {
     93     return io.grpc.binarylog.v1alpha.BinaryLogProto.internal_static_grpc_binarylog_v1alpha_Message_fieldAccessorTable
     94         .ensureFieldAccessorsInitialized(
     95             io.grpc.binarylog.v1alpha.Message.class, io.grpc.binarylog.v1alpha.Message.Builder.class);
     96   }
     97 
     98   public static final int FLAGS_FIELD_NUMBER = 1;
     99   private int flags_;
    100   /**
    101    * <pre>
    102    * This flag is currently used to indicate whether the payload is compressed,
    103    * it may contain other semantics in the future. Value of 1 indicates that the
    104    * binary octet sequence of Message is compressed using the mechanism declared
    105    * by the Message-Encoding header. A value of 0 indicates that no encoding of
    106    * Message bytes has occurred.
    107    * </pre>
    108    *
    109    * <code>uint32 flags = 1;</code>
    110    */
    111   public int getFlags() {
    112     return flags_;
    113   }
    114 
    115   public static final int LENGTH_FIELD_NUMBER = 2;
    116   private int length_;
    117   /**
    118    * <pre>
    119    * Length of the message. It may not be the same as the length of the
    120    * data field, as the logging payload can be truncated or omitted.
    121    * </pre>
    122    *
    123    * <code>uint32 length = 2;</code>
    124    */
    125   public int getLength() {
    126     return length_;
    127   }
    128 
    129   public static final int DATA_FIELD_NUMBER = 3;
    130   private com.google.protobuf.ByteString data_;
    131   /**
    132    * <pre>
    133    * May be truncated or omitted.
    134    * </pre>
    135    *
    136    * <code>bytes data = 3;</code>
    137    */
    138   public com.google.protobuf.ByteString getData() {
    139     return data_;
    140   }
    141 
    142   private byte memoizedIsInitialized = -1;
    143   public final boolean isInitialized() {
    144     byte isInitialized = memoizedIsInitialized;
    145     if (isInitialized == 1) return true;
    146     if (isInitialized == 0) return false;
    147 
    148     memoizedIsInitialized = 1;
    149     return true;
    150   }
    151 
    152   public void writeTo(com.google.protobuf.CodedOutputStream output)
    153                       throws java.io.IOException {
    154     if (flags_ != 0) {
    155       output.writeUInt32(1, flags_);
    156     }
    157     if (length_ != 0) {
    158       output.writeUInt32(2, length_);
    159     }
    160     if (!data_.isEmpty()) {
    161       output.writeBytes(3, data_);
    162     }
    163     unknownFields.writeTo(output);
    164   }
    165 
    166   public int getSerializedSize() {
    167     int size = memoizedSize;
    168     if (size != -1) return size;
    169 
    170     size = 0;
    171     if (flags_ != 0) {
    172       size += com.google.protobuf.CodedOutputStream
    173         .computeUInt32Size(1, flags_);
    174     }
    175     if (length_ != 0) {
    176       size += com.google.protobuf.CodedOutputStream
    177         .computeUInt32Size(2, length_);
    178     }
    179     if (!data_.isEmpty()) {
    180       size += com.google.protobuf.CodedOutputStream
    181         .computeBytesSize(3, data_);
    182     }
    183     size += unknownFields.getSerializedSize();
    184     memoizedSize = size;
    185     return size;
    186   }
    187 
    188   @java.lang.Override
    189   public boolean equals(final java.lang.Object obj) {
    190     if (obj == this) {
    191      return true;
    192     }
    193     if (!(obj instanceof io.grpc.binarylog.v1alpha.Message)) {
    194       return super.equals(obj);
    195     }
    196     io.grpc.binarylog.v1alpha.Message other = (io.grpc.binarylog.v1alpha.Message) obj;
    197 
    198     boolean result = true;
    199     result = result && (getFlags()
    200         == other.getFlags());
    201     result = result && (getLength()
    202         == other.getLength());
    203     result = result && getData()
    204         .equals(other.getData());
    205     result = result && unknownFields.equals(other.unknownFields);
    206     return result;
    207   }
    208 
    209   @java.lang.Override
    210   public int hashCode() {
    211     if (memoizedHashCode != 0) {
    212       return memoizedHashCode;
    213     }
    214     int hash = 41;
    215     hash = (19 * hash) + getDescriptor().hashCode();
    216     hash = (37 * hash) + FLAGS_FIELD_NUMBER;
    217     hash = (53 * hash) + getFlags();
    218     hash = (37 * hash) + LENGTH_FIELD_NUMBER;
    219     hash = (53 * hash) + getLength();
    220     hash = (37 * hash) + DATA_FIELD_NUMBER;
    221     hash = (53 * hash) + getData().hashCode();
    222     hash = (29 * hash) + unknownFields.hashCode();
    223     memoizedHashCode = hash;
    224     return hash;
    225   }
    226 
    227   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    228       java.nio.ByteBuffer data)
    229       throws com.google.protobuf.InvalidProtocolBufferException {
    230     return PARSER.parseFrom(data);
    231   }
    232   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    233       java.nio.ByteBuffer data,
    234       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    235       throws com.google.protobuf.InvalidProtocolBufferException {
    236     return PARSER.parseFrom(data, extensionRegistry);
    237   }
    238   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    239       com.google.protobuf.ByteString data)
    240       throws com.google.protobuf.InvalidProtocolBufferException {
    241     return PARSER.parseFrom(data);
    242   }
    243   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    244       com.google.protobuf.ByteString data,
    245       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    246       throws com.google.protobuf.InvalidProtocolBufferException {
    247     return PARSER.parseFrom(data, extensionRegistry);
    248   }
    249   public static io.grpc.binarylog.v1alpha.Message parseFrom(byte[] data)
    250       throws com.google.protobuf.InvalidProtocolBufferException {
    251     return PARSER.parseFrom(data);
    252   }
    253   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    254       byte[] data,
    255       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    256       throws com.google.protobuf.InvalidProtocolBufferException {
    257     return PARSER.parseFrom(data, extensionRegistry);
    258   }
    259   public static io.grpc.binarylog.v1alpha.Message parseFrom(java.io.InputStream input)
    260       throws java.io.IOException {
    261     return com.google.protobuf.GeneratedMessageV3
    262         .parseWithIOException(PARSER, input);
    263   }
    264   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    265       java.io.InputStream input,
    266       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    267       throws java.io.IOException {
    268     return com.google.protobuf.GeneratedMessageV3
    269         .parseWithIOException(PARSER, input, extensionRegistry);
    270   }
    271   public static io.grpc.binarylog.v1alpha.Message parseDelimitedFrom(java.io.InputStream input)
    272       throws java.io.IOException {
    273     return com.google.protobuf.GeneratedMessageV3
    274         .parseDelimitedWithIOException(PARSER, input);
    275   }
    276   public static io.grpc.binarylog.v1alpha.Message parseDelimitedFrom(
    277       java.io.InputStream input,
    278       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    279       throws java.io.IOException {
    280     return com.google.protobuf.GeneratedMessageV3
    281         .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    282   }
    283   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    284       com.google.protobuf.CodedInputStream input)
    285       throws java.io.IOException {
    286     return com.google.protobuf.GeneratedMessageV3
    287         .parseWithIOException(PARSER, input);
    288   }
    289   public static io.grpc.binarylog.v1alpha.Message parseFrom(
    290       com.google.protobuf.CodedInputStream input,
    291       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    292       throws java.io.IOException {
    293     return com.google.protobuf.GeneratedMessageV3
    294         .parseWithIOException(PARSER, input, extensionRegistry);
    295   }
    296 
    297   public Builder newBuilderForType() { return newBuilder(); }
    298   public static Builder newBuilder() {
    299     return DEFAULT_INSTANCE.toBuilder();
    300   }
    301   public static Builder newBuilder(io.grpc.binarylog.v1alpha.Message prototype) {
    302     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    303   }
    304   public Builder toBuilder() {
    305     return this == DEFAULT_INSTANCE
    306         ? new Builder() : new Builder().mergeFrom(this);
    307   }
    308 
    309   @java.lang.Override
    310   protected Builder newBuilderForType(
    311       com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    312     Builder builder = new Builder(parent);
    313     return builder;
    314   }
    315   /**
    316    * <pre>
    317    * Message payload, used by REQUEST and RESPONSE
    318    * </pre>
    319    *
    320    * Protobuf type {@code grpc.binarylog.v1alpha.Message}
    321    */
    322   public static final class Builder extends
    323       com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
    324       // @@protoc_insertion_point(builder_implements:grpc.binarylog.v1alpha.Message)
    325       io.grpc.binarylog.v1alpha.MessageOrBuilder {
    326     public static final com.google.protobuf.Descriptors.Descriptor
    327         getDescriptor() {
    328       return io.grpc.binarylog.v1alpha.BinaryLogProto.internal_static_grpc_binarylog_v1alpha_Message_descriptor;
    329     }
    330 
    331     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    332         internalGetFieldAccessorTable() {
    333       return io.grpc.binarylog.v1alpha.BinaryLogProto.internal_static_grpc_binarylog_v1alpha_Message_fieldAccessorTable
    334           .ensureFieldAccessorsInitialized(
    335               io.grpc.binarylog.v1alpha.Message.class, io.grpc.binarylog.v1alpha.Message.Builder.class);
    336     }
    337 
    338     // Construct using io.grpc.binarylog.v1alpha.Message.newBuilder()
    339     private Builder() {
    340       maybeForceBuilderInitialization();
    341     }
    342 
    343     private Builder(
    344         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    345       super(parent);
    346       maybeForceBuilderInitialization();
    347     }
    348     private void maybeForceBuilderInitialization() {
    349       if (com.google.protobuf.GeneratedMessageV3
    350               .alwaysUseFieldBuilders) {
    351       }
    352     }
    353     public Builder clear() {
    354       super.clear();
    355       flags_ = 0;
    356 
    357       length_ = 0;
    358 
    359       data_ = com.google.protobuf.ByteString.EMPTY;
    360 
    361       return this;
    362     }
    363 
    364     public com.google.protobuf.Descriptors.Descriptor
    365         getDescriptorForType() {
    366       return io.grpc.binarylog.v1alpha.BinaryLogProto.internal_static_grpc_binarylog_v1alpha_Message_descriptor;
    367     }
    368 
    369     public io.grpc.binarylog.v1alpha.Message getDefaultInstanceForType() {
    370       return io.grpc.binarylog.v1alpha.Message.getDefaultInstance();
    371     }
    372 
    373     public io.grpc.binarylog.v1alpha.Message build() {
    374       io.grpc.binarylog.v1alpha.Message result = buildPartial();
    375       if (!result.isInitialized()) {
    376         throw newUninitializedMessageException(result);
    377       }
    378       return result;
    379     }
    380 
    381     public io.grpc.binarylog.v1alpha.Message buildPartial() {
    382       io.grpc.binarylog.v1alpha.Message result = new io.grpc.binarylog.v1alpha.Message(this);
    383       result.flags_ = flags_;
    384       result.length_ = length_;
    385       result.data_ = data_;
    386       onBuilt();
    387       return result;
    388     }
    389 
    390     public Builder clone() {
    391       return (Builder) super.clone();
    392     }
    393     public Builder setField(
    394         com.google.protobuf.Descriptors.FieldDescriptor field,
    395         java.lang.Object value) {
    396       return (Builder) super.setField(field, value);
    397     }
    398     public Builder clearField(
    399         com.google.protobuf.Descriptors.FieldDescriptor field) {
    400       return (Builder) super.clearField(field);
    401     }
    402     public Builder clearOneof(
    403         com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    404       return (Builder) super.clearOneof(oneof);
    405     }
    406     public Builder setRepeatedField(
    407         com.google.protobuf.Descriptors.FieldDescriptor field,
    408         int index, java.lang.Object value) {
    409       return (Builder) super.setRepeatedField(field, index, value);
    410     }
    411     public Builder addRepeatedField(
    412         com.google.protobuf.Descriptors.FieldDescriptor field,
    413         java.lang.Object value) {
    414       return (Builder) super.addRepeatedField(field, value);
    415     }
    416     public Builder mergeFrom(com.google.protobuf.Message other) {
    417       if (other instanceof io.grpc.binarylog.v1alpha.Message) {
    418         return mergeFrom((io.grpc.binarylog.v1alpha.Message)other);
    419       } else {
    420         super.mergeFrom(other);
    421         return this;
    422       }
    423     }
    424 
    425     public Builder mergeFrom(io.grpc.binarylog.v1alpha.Message other) {
    426       if (other == io.grpc.binarylog.v1alpha.Message.getDefaultInstance()) return this;
    427       if (other.getFlags() != 0) {
    428         setFlags(other.getFlags());
    429       }
    430       if (other.getLength() != 0) {
    431         setLength(other.getLength());
    432       }
    433       if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
    434         setData(other.getData());
    435       }
    436       this.mergeUnknownFields(other.unknownFields);
    437       onChanged();
    438       return this;
    439     }
    440 
    441     public final boolean isInitialized() {
    442       return true;
    443     }
    444 
    445     public Builder mergeFrom(
    446         com.google.protobuf.CodedInputStream input,
    447         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    448         throws java.io.IOException {
    449       io.grpc.binarylog.v1alpha.Message parsedMessage = null;
    450       try {
    451         parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    452       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    453         parsedMessage = (io.grpc.binarylog.v1alpha.Message) e.getUnfinishedMessage();
    454         throw e.unwrapIOException();
    455       } finally {
    456         if (parsedMessage != null) {
    457           mergeFrom(parsedMessage);
    458         }
    459       }
    460       return this;
    461     }
    462 
    463     private int flags_ ;
    464     /**
    465      * <pre>
    466      * This flag is currently used to indicate whether the payload is compressed,
    467      * it may contain other semantics in the future. Value of 1 indicates that the
    468      * binary octet sequence of Message is compressed using the mechanism declared
    469      * by the Message-Encoding header. A value of 0 indicates that no encoding of
    470      * Message bytes has occurred.
    471      * </pre>
    472      *
    473      * <code>uint32 flags = 1;</code>
    474      */
    475     public int getFlags() {
    476       return flags_;
    477     }
    478     /**
    479      * <pre>
    480      * This flag is currently used to indicate whether the payload is compressed,
    481      * it may contain other semantics in the future. Value of 1 indicates that the
    482      * binary octet sequence of Message is compressed using the mechanism declared
    483      * by the Message-Encoding header. A value of 0 indicates that no encoding of
    484      * Message bytes has occurred.
    485      * </pre>
    486      *
    487      * <code>uint32 flags = 1;</code>
    488      */
    489     public Builder setFlags(int value) {
    490 
    491       flags_ = value;
    492       onChanged();
    493       return this;
    494     }
    495     /**
    496      * <pre>
    497      * This flag is currently used to indicate whether the payload is compressed,
    498      * it may contain other semantics in the future. Value of 1 indicates that the
    499      * binary octet sequence of Message is compressed using the mechanism declared
    500      * by the Message-Encoding header. A value of 0 indicates that no encoding of
    501      * Message bytes has occurred.
    502      * </pre>
    503      *
    504      * <code>uint32 flags = 1;</code>
    505      */
    506     public Builder clearFlags() {
    507 
    508       flags_ = 0;
    509       onChanged();
    510       return this;
    511     }
    512 
    513     private int length_ ;
    514     /**
    515      * <pre>
    516      * Length of the message. It may not be the same as the length of the
    517      * data field, as the logging payload can be truncated or omitted.
    518      * </pre>
    519      *
    520      * <code>uint32 length = 2;</code>
    521      */
    522     public int getLength() {
    523       return length_;
    524     }
    525     /**
    526      * <pre>
    527      * Length of the message. It may not be the same as the length of the
    528      * data field, as the logging payload can be truncated or omitted.
    529      * </pre>
    530      *
    531      * <code>uint32 length = 2;</code>
    532      */
    533     public Builder setLength(int value) {
    534 
    535       length_ = value;
    536       onChanged();
    537       return this;
    538     }
    539     /**
    540      * <pre>
    541      * Length of the message. It may not be the same as the length of the
    542      * data field, as the logging payload can be truncated or omitted.
    543      * </pre>
    544      *
    545      * <code>uint32 length = 2;</code>
    546      */
    547     public Builder clearLength() {
    548 
    549       length_ = 0;
    550       onChanged();
    551       return this;
    552     }
    553 
    554     private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
    555     /**
    556      * <pre>
    557      * May be truncated or omitted.
    558      * </pre>
    559      *
    560      * <code>bytes data = 3;</code>
    561      */
    562     public com.google.protobuf.ByteString getData() {
    563       return data_;
    564     }
    565     /**
    566      * <pre>
    567      * May be truncated or omitted.
    568      * </pre>
    569      *
    570      * <code>bytes data = 3;</code>
    571      */
    572     public Builder setData(com.google.protobuf.ByteString value) {
    573       if (value == null) {
    574     throw new NullPointerException();
    575   }
    576 
    577       data_ = value;
    578       onChanged();
    579       return this;
    580     }
    581     /**
    582      * <pre>
    583      * May be truncated or omitted.
    584      * </pre>
    585      *
    586      * <code>bytes data = 3;</code>
    587      */
    588     public Builder clearData() {
    589 
    590       data_ = getDefaultInstance().getData();
    591       onChanged();
    592       return this;
    593     }
    594     public final Builder setUnknownFields(
    595         final com.google.protobuf.UnknownFieldSet unknownFields) {
    596       return super.setUnknownFieldsProto3(unknownFields);
    597     }
    598 
    599     public final Builder mergeUnknownFields(
    600         final com.google.protobuf.UnknownFieldSet unknownFields) {
    601       return super.mergeUnknownFields(unknownFields);
    602     }
    603 
    604 
    605     // @@protoc_insertion_point(builder_scope:grpc.binarylog.v1alpha.Message)
    606   }
    607 
    608   // @@protoc_insertion_point(class_scope:grpc.binarylog.v1alpha.Message)
    609   private static final io.grpc.binarylog.v1alpha.Message DEFAULT_INSTANCE;
    610   static {
    611     DEFAULT_INSTANCE = new io.grpc.binarylog.v1alpha.Message();
    612   }
    613 
    614   public static io.grpc.binarylog.v1alpha.Message getDefaultInstance() {
    615     return DEFAULT_INSTANCE;
    616   }
    617 
    618   private static final com.google.protobuf.Parser<Message>
    619       PARSER = new com.google.protobuf.AbstractParser<Message>() {
    620     public Message parsePartialFrom(
    621         com.google.protobuf.CodedInputStream input,
    622         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    623         throws com.google.protobuf.InvalidProtocolBufferException {
    624       return new Message(input, extensionRegistry);
    625     }
    626   };
    627 
    628   public static com.google.protobuf.Parser<Message> parser() {
    629     return PARSER;
    630   }
    631 
    632   @java.lang.Override
    633   public com.google.protobuf.Parser<Message> getParserForType() {
    634     return PARSER;
    635   }
    636 
    637   public io.grpc.binarylog.v1alpha.Message getDefaultInstanceForType() {
    638     return DEFAULT_INSTANCE;
    639   }
    640 
    641 }
    642 
    643