// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: types/transaction.proto

package proto.types;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface TxIDOrBuilder extends
      // @@protoc_insertion_point(interface_extends:proto.types.TxID)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>int32 proposerID = 1;</code>
     */
    int getProposerID();

    /**
     * <code>int32 bid = 2;</code>
     */
    int getBid();

    /**
     * <code>int32 txNum = 3;</code>
     */
    int getTxNum();

    /**
     * <code>int32 channel = 4;</code>
     */
    int getChannel();
  }
  /**
   * Protobuf type {@code proto.types.TxID}
   */
  public  static final class TxID extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:proto.types.TxID)
      TxIDOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use TxID.newBuilder() to construct.
    private TxID(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private TxID() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private TxID(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {

              proposerID_ = input.readInt32();
              break;
            }
            case 16: {

              bid_ = input.readInt32();
              break;
            }
            case 24: {

              txNum_ = input.readInt32();
              break;
            }
            case 32: {

              channel_ = input.readInt32();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return proto.types.transaction.internal_static_proto_types_TxID_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return proto.types.transaction.internal_static_proto_types_TxID_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              proto.types.transaction.TxID.class, proto.types.transaction.TxID.Builder.class);
    }

    public static final int PROPOSERID_FIELD_NUMBER = 1;
    private int proposerID_;
    /**
     * <code>int32 proposerID = 1;</code>
     */
    public int getProposerID() {
      return proposerID_;
    }

    public static final int BID_FIELD_NUMBER = 2;
    private int bid_;
    /**
     * <code>int32 bid = 2;</code>
     */
    public int getBid() {
      return bid_;
    }

    public static final int TXNUM_FIELD_NUMBER = 3;
    private int txNum_;
    /**
     * <code>int32 txNum = 3;</code>
     */
    public int getTxNum() {
      return txNum_;
    }

    public static final int CHANNEL_FIELD_NUMBER = 4;
    private int channel_;
    /**
     * <code>int32 channel = 4;</code>
     */
    public int getChannel() {
      return channel_;
    }

    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 (proposerID_ != 0) {
        output.writeInt32(1, proposerID_);
      }
      if (bid_ != 0) {
        output.writeInt32(2, bid_);
      }
      if (txNum_ != 0) {
        output.writeInt32(3, txNum_);
      }
      if (channel_ != 0) {
        output.writeInt32(4, channel_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (proposerID_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, proposerID_);
      }
      if (bid_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, bid_);
      }
      if (txNum_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, txNum_);
      }
      if (channel_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, channel_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof proto.types.transaction.TxID)) {
        return super.equals(obj);
      }
      proto.types.transaction.TxID other = (proto.types.transaction.TxID) obj;

      if (getProposerID()
          != other.getProposerID()) return false;
      if (getBid()
          != other.getBid()) return false;
      if (getTxNum()
          != other.getTxNum()) return false;
      if (getChannel()
          != other.getChannel()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PROPOSERID_FIELD_NUMBER;
      hash = (53 * hash) + getProposerID();
      hash = (37 * hash) + BID_FIELD_NUMBER;
      hash = (53 * hash) + getBid();
      hash = (37 * hash) + TXNUM_FIELD_NUMBER;
      hash = (53 * hash) + getTxNum();
      hash = (37 * hash) + CHANNEL_FIELD_NUMBER;
      hash = (53 * hash) + getChannel();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static proto.types.transaction.TxID parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.TxID parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.TxID parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.TxID parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.TxID parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.TxID parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.TxID parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static proto.types.transaction.TxID 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 proto.types.transaction.TxID parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static proto.types.transaction.TxID 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 proto.types.transaction.TxID parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static proto.types.transaction.TxID 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(proto.types.transaction.TxID 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 proto.types.TxID}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:proto.types.TxID)
        proto.types.transaction.TxIDOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return proto.types.transaction.internal_static_proto_types_TxID_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return proto.types.transaction.internal_static_proto_types_TxID_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                proto.types.transaction.TxID.class, proto.types.transaction.TxID.Builder.class);
      }

      // Construct using proto.types.transaction.TxID.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        proposerID_ = 0;

        bid_ = 0;

        txNum_ = 0;

        channel_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return proto.types.transaction.internal_static_proto_types_TxID_descriptor;
      }

      @java.lang.Override
      public proto.types.transaction.TxID getDefaultInstanceForType() {
        return proto.types.transaction.TxID.getDefaultInstance();
      }

      @java.lang.Override
      public proto.types.transaction.TxID build() {
        proto.types.transaction.TxID result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public proto.types.transaction.TxID buildPartial() {
        proto.types.transaction.TxID result = new proto.types.transaction.TxID(this);
        result.proposerID_ = proposerID_;
        result.bid_ = bid_;
        result.txNum_ = txNum_;
        result.channel_ = channel_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof proto.types.transaction.TxID) {
          return mergeFrom((proto.types.transaction.TxID)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(proto.types.transaction.TxID other) {
        if (other == proto.types.transaction.TxID.getDefaultInstance()) return this;
        if (other.getProposerID() != 0) {
          setProposerID(other.getProposerID());
        }
        if (other.getBid() != 0) {
          setBid(other.getBid());
        }
        if (other.getTxNum() != 0) {
          setTxNum(other.getTxNum());
        }
        if (other.getChannel() != 0) {
          setChannel(other.getChannel());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        proto.types.transaction.TxID parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (proto.types.transaction.TxID) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int proposerID_ ;
      /**
       * <code>int32 proposerID = 1;</code>
       */
      public int getProposerID() {
        return proposerID_;
      }
      /**
       * <code>int32 proposerID = 1;</code>
       */
      public Builder setProposerID(int value) {
        
        proposerID_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 proposerID = 1;</code>
       */
      public Builder clearProposerID() {
        
        proposerID_ = 0;
        onChanged();
        return this;
      }

      private int bid_ ;
      /**
       * <code>int32 bid = 2;</code>
       */
      public int getBid() {
        return bid_;
      }
      /**
       * <code>int32 bid = 2;</code>
       */
      public Builder setBid(int value) {
        
        bid_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 bid = 2;</code>
       */
      public Builder clearBid() {
        
        bid_ = 0;
        onChanged();
        return this;
      }

      private int txNum_ ;
      /**
       * <code>int32 txNum = 3;</code>
       */
      public int getTxNum() {
        return txNum_;
      }
      /**
       * <code>int32 txNum = 3;</code>
       */
      public Builder setTxNum(int value) {
        
        txNum_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 txNum = 3;</code>
       */
      public Builder clearTxNum() {
        
        txNum_ = 0;
        onChanged();
        return this;
      }

      private int channel_ ;
      /**
       * <code>int32 channel = 4;</code>
       */
      public int getChannel() {
        return channel_;
      }
      /**
       * <code>int32 channel = 4;</code>
       */
      public Builder setChannel(int value) {
        
        channel_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 channel = 4;</code>
       */
      public Builder clearChannel() {
        
        channel_ = 0;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:proto.types.TxID)
    }

    // @@protoc_insertion_point(class_scope:proto.types.TxID)
    private static final proto.types.transaction.TxID DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new proto.types.transaction.TxID();
    }

    public static proto.types.transaction.TxID getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<TxID>
        PARSER = new com.google.protobuf.AbstractParser<TxID>() {
      @java.lang.Override
      public TxID parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new TxID(input, extensionRegistry);
      }
    };

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

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

    @java.lang.Override
    public proto.types.transaction.TxID getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface TransactionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:proto.types.Transaction)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>int32 clientID = 1;</code>
     */
    int getClientID();

    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    boolean hasId();
    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    proto.types.transaction.TxID getId();
    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    proto.types.transaction.TxIDOrBuilder getIdOrBuilder();

    /**
     * <pre>
     * generic data type
     * </pre>
     *
     * <code>bytes data = 3;</code>
     */
    com.google.protobuf.ByteString getData();
  }
  /**
   * Protobuf type {@code proto.types.Transaction}
   */
  public  static final class Transaction extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:proto.types.Transaction)
      TransactionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Transaction.newBuilder() to construct.
    private Transaction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Transaction() {
      data_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Transaction(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {

              clientID_ = input.readInt32();
              break;
            }
            case 18: {
              proto.types.transaction.TxID.Builder subBuilder = null;
              if (id_ != null) {
                subBuilder = id_.toBuilder();
              }
              id_ = input.readMessage(proto.types.transaction.TxID.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(id_);
                id_ = subBuilder.buildPartial();
              }

              break;
            }
            case 26: {

              data_ = input.readBytes();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return proto.types.transaction.internal_static_proto_types_Transaction_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return proto.types.transaction.internal_static_proto_types_Transaction_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              proto.types.transaction.Transaction.class, proto.types.transaction.Transaction.Builder.class);
    }

    public static final int CLIENTID_FIELD_NUMBER = 1;
    private int clientID_;
    /**
     * <code>int32 clientID = 1;</code>
     */
    public int getClientID() {
      return clientID_;
    }

    public static final int ID_FIELD_NUMBER = 2;
    private proto.types.transaction.TxID id_;
    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    public boolean hasId() {
      return id_ != null;
    }
    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    public proto.types.transaction.TxID getId() {
      return id_ == null ? proto.types.transaction.TxID.getDefaultInstance() : id_;
    }
    /**
     * <code>.proto.types.TxID id = 2;</code>
     */
    public proto.types.transaction.TxIDOrBuilder getIdOrBuilder() {
      return getId();
    }

    public static final int DATA_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString data_;
    /**
     * <pre>
     * generic data type
     * </pre>
     *
     * <code>bytes data = 3;</code>
     */
    public com.google.protobuf.ByteString getData() {
      return data_;
    }

    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 (clientID_ != 0) {
        output.writeInt32(1, clientID_);
      }
      if (id_ != null) {
        output.writeMessage(2, getId());
      }
      if (!data_.isEmpty()) {
        output.writeBytes(3, data_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (clientID_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, clientID_);
      }
      if (id_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getId());
      }
      if (!data_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, data_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof proto.types.transaction.Transaction)) {
        return super.equals(obj);
      }
      proto.types.transaction.Transaction other = (proto.types.transaction.Transaction) obj;

      if (getClientID()
          != other.getClientID()) return false;
      if (hasId() != other.hasId()) return false;
      if (hasId()) {
        if (!getId()
            .equals(other.getId())) return false;
      }
      if (!getData()
          .equals(other.getData())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + CLIENTID_FIELD_NUMBER;
      hash = (53 * hash) + getClientID();
      if (hasId()) {
        hash = (37 * hash) + ID_FIELD_NUMBER;
        hash = (53 * hash) + getId().hashCode();
      }
      hash = (37 * hash) + DATA_FIELD_NUMBER;
      hash = (53 * hash) + getData().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static proto.types.transaction.Transaction parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.Transaction parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.Transaction parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.Transaction parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.Transaction parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static proto.types.transaction.Transaction parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static proto.types.transaction.Transaction parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static proto.types.transaction.Transaction 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 proto.types.transaction.Transaction parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static proto.types.transaction.Transaction 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 proto.types.transaction.Transaction parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static proto.types.transaction.Transaction 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(proto.types.transaction.Transaction 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 proto.types.Transaction}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:proto.types.Transaction)
        proto.types.transaction.TransactionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return proto.types.transaction.internal_static_proto_types_Transaction_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return proto.types.transaction.internal_static_proto_types_Transaction_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                proto.types.transaction.Transaction.class, proto.types.transaction.Transaction.Builder.class);
      }

      // Construct using proto.types.transaction.Transaction.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        clientID_ = 0;

        if (idBuilder_ == null) {
          id_ = null;
        } else {
          id_ = null;
          idBuilder_ = null;
        }
        data_ = com.google.protobuf.ByteString.EMPTY;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return proto.types.transaction.internal_static_proto_types_Transaction_descriptor;
      }

      @java.lang.Override
      public proto.types.transaction.Transaction getDefaultInstanceForType() {
        return proto.types.transaction.Transaction.getDefaultInstance();
      }

      @java.lang.Override
      public proto.types.transaction.Transaction build() {
        proto.types.transaction.Transaction result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public proto.types.transaction.Transaction buildPartial() {
        proto.types.transaction.Transaction result = new proto.types.transaction.Transaction(this);
        result.clientID_ = clientID_;
        if (idBuilder_ == null) {
          result.id_ = id_;
        } else {
          result.id_ = idBuilder_.build();
        }
        result.data_ = data_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof proto.types.transaction.Transaction) {
          return mergeFrom((proto.types.transaction.Transaction)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(proto.types.transaction.Transaction other) {
        if (other == proto.types.transaction.Transaction.getDefaultInstance()) return this;
        if (other.getClientID() != 0) {
          setClientID(other.getClientID());
        }
        if (other.hasId()) {
          mergeId(other.getId());
        }
        if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
          setData(other.getData());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        proto.types.transaction.Transaction parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (proto.types.transaction.Transaction) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int clientID_ ;
      /**
       * <code>int32 clientID = 1;</code>
       */
      public int getClientID() {
        return clientID_;
      }
      /**
       * <code>int32 clientID = 1;</code>
       */
      public Builder setClientID(int value) {
        
        clientID_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 clientID = 1;</code>
       */
      public Builder clearClientID() {
        
        clientID_ = 0;
        onChanged();
        return this;
      }

      private proto.types.transaction.TxID id_;
      private com.google.protobuf.SingleFieldBuilderV3<
          proto.types.transaction.TxID, proto.types.transaction.TxID.Builder, proto.types.transaction.TxIDOrBuilder> idBuilder_;
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public boolean hasId() {
        return idBuilder_ != null || id_ != null;
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public proto.types.transaction.TxID getId() {
        if (idBuilder_ == null) {
          return id_ == null ? proto.types.transaction.TxID.getDefaultInstance() : id_;
        } else {
          return idBuilder_.getMessage();
        }
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public Builder setId(proto.types.transaction.TxID value) {
        if (idBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          id_ = value;
          onChanged();
        } else {
          idBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public Builder setId(
          proto.types.transaction.TxID.Builder builderForValue) {
        if (idBuilder_ == null) {
          id_ = builderForValue.build();
          onChanged();
        } else {
          idBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public Builder mergeId(proto.types.transaction.TxID value) {
        if (idBuilder_ == null) {
          if (id_ != null) {
            id_ =
              proto.types.transaction.TxID.newBuilder(id_).mergeFrom(value).buildPartial();
          } else {
            id_ = value;
          }
          onChanged();
        } else {
          idBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public Builder clearId() {
        if (idBuilder_ == null) {
          id_ = null;
          onChanged();
        } else {
          id_ = null;
          idBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public proto.types.transaction.TxID.Builder getIdBuilder() {
        
        onChanged();
        return getIdFieldBuilder().getBuilder();
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      public proto.types.transaction.TxIDOrBuilder getIdOrBuilder() {
        if (idBuilder_ != null) {
          return idBuilder_.getMessageOrBuilder();
        } else {
          return id_ == null ?
              proto.types.transaction.TxID.getDefaultInstance() : id_;
        }
      }
      /**
       * <code>.proto.types.TxID id = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          proto.types.transaction.TxID, proto.types.transaction.TxID.Builder, proto.types.transaction.TxIDOrBuilder> 
          getIdFieldBuilder() {
        if (idBuilder_ == null) {
          idBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              proto.types.transaction.TxID, proto.types.transaction.TxID.Builder, proto.types.transaction.TxIDOrBuilder>(
                  getId(),
                  getParentForChildren(),
                  isClean());
          id_ = null;
        }
        return idBuilder_;
      }

      private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * generic data type
       * </pre>
       *
       * <code>bytes data = 3;</code>
       */
      public com.google.protobuf.ByteString getData() {
        return data_;
      }
      /**
       * <pre>
       * generic data type
       * </pre>
       *
       * <code>bytes data = 3;</code>
       */
      public Builder setData(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        data_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * generic data type
       * </pre>
       *
       * <code>bytes data = 3;</code>
       */
      public Builder clearData() {
        
        data_ = getDefaultInstance().getData();
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:proto.types.Transaction)
    }

    // @@protoc_insertion_point(class_scope:proto.types.Transaction)
    private static final proto.types.transaction.Transaction DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new proto.types.transaction.Transaction();
    }

    public static proto.types.transaction.Transaction getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Transaction>
        PARSER = new com.google.protobuf.AbstractParser<Transaction>() {
      @java.lang.Override
      public Transaction parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Transaction(input, extensionRegistry);
      }
    };

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

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

    @java.lang.Override
    public proto.types.transaction.Transaction getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_proto_types_TxID_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_proto_types_TxID_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_proto_types_Transaction_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_proto_types_Transaction_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\027types/transaction.proto\022\013proto.types\"G" +
      "\n\004TxID\022\022\n\nproposerID\030\001 \001(\005\022\013\n\003bid\030\002 \001(\005\022" +
      "\r\n\005txNum\030\003 \001(\005\022\017\n\007channel\030\004 \001(\005\"L\n\013Trans" +
      "action\022\020\n\010clientID\030\001 \001(\005\022\035\n\002id\030\002 \001(\0132\021.p" +
      "roto.types.TxID\022\014\n\004data\030\003 \001(\014B\032\n\013proto.t" +
      "ypesB\013transactionb\006proto3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
    internal_static_proto_types_TxID_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_proto_types_TxID_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_proto_types_TxID_descriptor,
        new java.lang.String[] { "ProposerID", "Bid", "TxNum", "Channel", });
    internal_static_proto_types_Transaction_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_proto_types_Transaction_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_proto_types_Transaction_descriptor,
        new java.lang.String[] { "ClientID", "Id", "Data", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
