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

org.hyperledger.fabric.protos.peer.ChaincodeMessage Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: peer/chaincode_shim.proto

package org.hyperledger.fabric.protos.peer;

/**
 * Protobuf type {@code protos.ChaincodeMessage}
 */
public final class ChaincodeMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:protos.ChaincodeMessage)
    ChaincodeMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ChaincodeMessage.newBuilder() to construct.
  private ChaincodeMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ChaincodeMessage() {
    type_ = 0;
    payload_ = com.google.protobuf.ByteString.EMPTY;
    txid_ = "";
    channelId_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ChaincodeMessage(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    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: {
            int rawValue = input.readEnum();

            type_ = rawValue;
            break;
          }
          case 18: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (timestamp_ != null) {
              subBuilder = timestamp_.toBuilder();
            }
            timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(timestamp_);
              timestamp_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {

            payload_ = input.readBytes();
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            txid_ = s;
            break;
          }
          case 42: {
            org.hyperledger.fabric.protos.peer.SignedProposal.Builder subBuilder = null;
            if (proposal_ != null) {
              subBuilder = proposal_.toBuilder();
            }
            proposal_ = input.readMessage(org.hyperledger.fabric.protos.peer.SignedProposal.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(proposal_);
              proposal_ = subBuilder.buildPartial();
            }

            break;
          }
          case 50: {
            org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder subBuilder = null;
            if (chaincodeEvent_ != null) {
              subBuilder = chaincodeEvent_.toBuilder();
            }
            chaincodeEvent_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeEvent.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(chaincodeEvent_);
              chaincodeEvent_ = subBuilder.buildPartial();
            }

            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            channelId_ = s;
            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 org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.hyperledger.fabric.protos.peer.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeMessage.Builder.class);
  }

  /**
   * Protobuf enum {@code protos.ChaincodeMessage.Type}
   */
  public enum Type
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * UNDEFINED = 0;
     */
    UNDEFINED(0),
    /**
     * REGISTER = 1;
     */
    REGISTER(1),
    /**
     * REGISTERED = 2;
     */
    REGISTERED(2),
    /**
     * INIT = 3;
     */
    INIT(3),
    /**
     * READY = 4;
     */
    READY(4),
    /**
     * TRANSACTION = 5;
     */
    TRANSACTION(5),
    /**
     * COMPLETED = 6;
     */
    COMPLETED(6),
    /**
     * ERROR = 7;
     */
    ERROR(7),
    /**
     * GET_STATE = 8;
     */
    GET_STATE(8),
    /**
     * PUT_STATE = 9;
     */
    PUT_STATE(9),
    /**
     * DEL_STATE = 10;
     */
    DEL_STATE(10),
    /**
     * INVOKE_CHAINCODE = 11;
     */
    INVOKE_CHAINCODE(11),
    /**
     * RESPONSE = 13;
     */
    RESPONSE(13),
    /**
     * GET_STATE_BY_RANGE = 14;
     */
    GET_STATE_BY_RANGE(14),
    /**
     * GET_QUERY_RESULT = 15;
     */
    GET_QUERY_RESULT(15),
    /**
     * QUERY_STATE_NEXT = 16;
     */
    QUERY_STATE_NEXT(16),
    /**
     * QUERY_STATE_CLOSE = 17;
     */
    QUERY_STATE_CLOSE(17),
    /**
     * KEEPALIVE = 18;
     */
    KEEPALIVE(18),
    /**
     * GET_HISTORY_FOR_KEY = 19;
     */
    GET_HISTORY_FOR_KEY(19),
    /**
     * GET_STATE_METADATA = 20;
     */
    GET_STATE_METADATA(20),
    /**
     * PUT_STATE_METADATA = 21;
     */
    PUT_STATE_METADATA(21),
    /**
     * GET_PRIVATE_DATA_HASH = 22;
     */
    GET_PRIVATE_DATA_HASH(22),
    /**
     * PURGE_PRIVATE_DATA = 23;
     */
    PURGE_PRIVATE_DATA(23),
    UNRECOGNIZED(-1),
    ;

    /**
     * UNDEFINED = 0;
     */
    public static final int UNDEFINED_VALUE = 0;
    /**
     * REGISTER = 1;
     */
    public static final int REGISTER_VALUE = 1;
    /**
     * REGISTERED = 2;
     */
    public static final int REGISTERED_VALUE = 2;
    /**
     * INIT = 3;
     */
    public static final int INIT_VALUE = 3;
    /**
     * READY = 4;
     */
    public static final int READY_VALUE = 4;
    /**
     * TRANSACTION = 5;
     */
    public static final int TRANSACTION_VALUE = 5;
    /**
     * COMPLETED = 6;
     */
    public static final int COMPLETED_VALUE = 6;
    /**
     * ERROR = 7;
     */
    public static final int ERROR_VALUE = 7;
    /**
     * GET_STATE = 8;
     */
    public static final int GET_STATE_VALUE = 8;
    /**
     * PUT_STATE = 9;
     */
    public static final int PUT_STATE_VALUE = 9;
    /**
     * DEL_STATE = 10;
     */
    public static final int DEL_STATE_VALUE = 10;
    /**
     * INVOKE_CHAINCODE = 11;
     */
    public static final int INVOKE_CHAINCODE_VALUE = 11;
    /**
     * RESPONSE = 13;
     */
    public static final int RESPONSE_VALUE = 13;
    /**
     * GET_STATE_BY_RANGE = 14;
     */
    public static final int GET_STATE_BY_RANGE_VALUE = 14;
    /**
     * GET_QUERY_RESULT = 15;
     */
    public static final int GET_QUERY_RESULT_VALUE = 15;
    /**
     * QUERY_STATE_NEXT = 16;
     */
    public static final int QUERY_STATE_NEXT_VALUE = 16;
    /**
     * QUERY_STATE_CLOSE = 17;
     */
    public static final int QUERY_STATE_CLOSE_VALUE = 17;
    /**
     * KEEPALIVE = 18;
     */
    public static final int KEEPALIVE_VALUE = 18;
    /**
     * GET_HISTORY_FOR_KEY = 19;
     */
    public static final int GET_HISTORY_FOR_KEY_VALUE = 19;
    /**
     * GET_STATE_METADATA = 20;
     */
    public static final int GET_STATE_METADATA_VALUE = 20;
    /**
     * PUT_STATE_METADATA = 21;
     */
    public static final int PUT_STATE_METADATA_VALUE = 21;
    /**
     * GET_PRIVATE_DATA_HASH = 22;
     */
    public static final int GET_PRIVATE_DATA_HASH_VALUE = 22;
    /**
     * PURGE_PRIVATE_DATA = 23;
     */
    public static final int PURGE_PRIVATE_DATA_VALUE = 23;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Type valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Type forNumber(int value) {
      switch (value) {
        case 0: return UNDEFINED;
        case 1: return REGISTER;
        case 2: return REGISTERED;
        case 3: return INIT;
        case 4: return READY;
        case 5: return TRANSACTION;
        case 6: return COMPLETED;
        case 7: return ERROR;
        case 8: return GET_STATE;
        case 9: return PUT_STATE;
        case 10: return DEL_STATE;
        case 11: return INVOKE_CHAINCODE;
        case 13: return RESPONSE;
        case 14: return GET_STATE_BY_RANGE;
        case 15: return GET_QUERY_RESULT;
        case 16: return QUERY_STATE_NEXT;
        case 17: return QUERY_STATE_CLOSE;
        case 18: return KEEPALIVE;
        case 19: return GET_HISTORY_FOR_KEY;
        case 20: return GET_STATE_METADATA;
        case 21: return PUT_STATE_METADATA;
        case 22: return GET_PRIVATE_DATA_HASH;
        case 23: return PURGE_PRIVATE_DATA;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Type> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Type findValueByNumber(int number) {
              return Type.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDescriptor().getEnumTypes().get(0);
    }

    private static final Type[] VALUES = values();

    public static Type valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Type(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:protos.ChaincodeMessage.Type)
  }

  public static final int TYPE_FIELD_NUMBER = 1;
  private int type_;
  /**
   * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
   * @return The enum numeric value on the wire for type.
   */
  @java.lang.Override public int getTypeValue() {
    return type_;
  }
  /**
   * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
   * @return The type.
   */
  @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type getType() {
    @SuppressWarnings("deprecation")
    org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.valueOf(type_);
    return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNRECOGNIZED : result;
  }

  public static final int TIMESTAMP_FIELD_NUMBER = 2;
  private com.google.protobuf.Timestamp timestamp_;
  /**
   * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
   * @return Whether the timestamp field is set.
   */
  @java.lang.Override
  public boolean hasTimestamp() {
    return timestamp_ != null;
  }
  /**
   * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
   * @return The timestamp.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getTimestamp() {
    return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
  }
  /**
   * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
    return getTimestamp();
  }

  public static final int PAYLOAD_FIELD_NUMBER = 3;
  private com.google.protobuf.ByteString payload_;
  /**
   * bytes payload = 3 [json_name = "payload"];
   * @return The payload.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getPayload() {
    return payload_;
  }

  public static final int TXID_FIELD_NUMBER = 4;
  private volatile java.lang.Object txid_;
  /**
   * string txid = 4 [json_name = "txid"];
   * @return The txid.
   */
  @java.lang.Override
  public java.lang.String getTxid() {
    java.lang.Object ref = txid_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      txid_ = s;
      return s;
    }
  }
  /**
   * string txid = 4 [json_name = "txid"];
   * @return The bytes for txid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTxidBytes() {
    java.lang.Object ref = txid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      txid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PROPOSAL_FIELD_NUMBER = 5;
  private org.hyperledger.fabric.protos.peer.SignedProposal proposal_;
  /**
   * .protos.SignedProposal proposal = 5 [json_name = "proposal"];
   * @return Whether the proposal field is set.
   */
  @java.lang.Override
  public boolean hasProposal() {
    return proposal_ != null;
  }
  /**
   * .protos.SignedProposal proposal = 5 [json_name = "proposal"];
   * @return The proposal.
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.SignedProposal getProposal() {
    return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_;
  }
  /**
   * .protos.SignedProposal proposal = 5 [json_name = "proposal"];
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposalOrBuilder() {
    return getProposal();
  }

  public static final int CHAINCODE_EVENT_FIELD_NUMBER = 6;
  private org.hyperledger.fabric.protos.peer.ChaincodeEvent chaincodeEvent_;
  /**
   * 
   *event emitted by chaincode. Used only with Init or Invoke.
   * This event is then stored (currently)
   *with Block.NonHashData.TransactionResult
   * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; * @return Whether the chaincodeEvent field is set. */ @java.lang.Override public boolean hasChaincodeEvent() { return chaincodeEvent_ != null; } /** *
   *event emitted by chaincode. Used only with Init or Invoke.
   * This event is then stored (currently)
   *with Block.NonHashData.TransactionResult
   * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; * @return The chaincodeEvent. */ @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeEvent getChaincodeEvent() { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_; } /** *
   *event emitted by chaincode. Used only with Init or Invoke.
   * This event is then stored (currently)
   *with Block.NonHashData.TransactionResult
   * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() { return getChaincodeEvent(); } public static final int CHANNEL_ID_FIELD_NUMBER = 7; private volatile java.lang.Object channelId_; /** *
   *channel id
   * 
* * string channel_id = 7 [json_name = "channelId"]; * @return The channelId. */ @java.lang.Override public java.lang.String getChannelId() { java.lang.Object ref = channelId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channelId_ = s; return s; } } /** *
   *channel id
   * 
* * string channel_id = 7 [json_name = "channelId"]; * @return The bytes for channelId. */ @java.lang.Override public com.google.protobuf.ByteString getChannelIdBytes() { java.lang.Object ref = channelId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); channelId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (type_ != org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNDEFINED.getNumber()) { output.writeEnum(1, type_); } if (timestamp_ != null) { output.writeMessage(2, getTimestamp()); } if (!payload_.isEmpty()) { output.writeBytes(3, payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, txid_); } if (proposal_ != null) { output.writeMessage(5, getProposal()); } if (chaincodeEvent_ != null) { output.writeMessage(6, getChaincodeEvent()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, channelId_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, type_); } if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getTimestamp()); } if (!payload_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, txid_); } if (proposal_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getProposal()); } if (chaincodeEvent_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getChaincodeEvent()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, channelId_); } 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 org.hyperledger.fabric.protos.peer.ChaincodeMessage)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeMessage other = (org.hyperledger.fabric.protos.peer.ChaincodeMessage) obj; if (type_ != other.type_) return false; if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp() .equals(other.getTimestamp())) return false; } if (!getPayload() .equals(other.getPayload())) return false; if (!getTxid() .equals(other.getTxid())) return false; if (hasProposal() != other.hasProposal()) return false; if (hasProposal()) { if (!getProposal() .equals(other.getProposal())) return false; } if (hasChaincodeEvent() != other.hasChaincodeEvent()) return false; if (hasChaincodeEvent()) { if (!getChaincodeEvent() .equals(other.getChaincodeEvent())) return false; } if (!getChannelId() .equals(other.getChannelId())) 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) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasTimestamp()) { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (37 * hash) + TXID_FIELD_NUMBER; hash = (53 * hash) + getTxid().hashCode(); if (hasProposal()) { hash = (37 * hash) + PROPOSAL_FIELD_NUMBER; hash = (53 * hash) + getProposal().hashCode(); } if (hasChaincodeEvent()) { hash = (37 * hash) + CHAINCODE_EVENT_FIELD_NUMBER; hash = (53 * hash) + getChaincodeEvent().hashCode(); } hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; hash = (53 * hash) + getChannelId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage 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 org.hyperledger.fabric.protos.peer.ChaincodeMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage 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 org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage 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(org.hyperledger.fabric.protos.peer.ChaincodeMessage 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 protos.ChaincodeMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.ChaincodeMessage) org.hyperledger.fabric.protos.peer.ChaincodeMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeMessage.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeMessage.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(); type_ = 0; if (timestampBuilder_ == null) { timestamp_ = null; } else { timestamp_ = null; timestampBuilder_ = null; } payload_ = com.google.protobuf.ByteString.EMPTY; txid_ = ""; if (proposalBuilder_ == null) { proposal_ = null; } else { proposal_ = null; proposalBuilder_ = null; } if (chaincodeEventBuilder_ == null) { chaincodeEvent_ = null; } else { chaincodeEvent_ = null; chaincodeEventBuilder_ = null; } channelId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage build() { org.hyperledger.fabric.protos.peer.ChaincodeMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeMessage result = new org.hyperledger.fabric.protos.peer.ChaincodeMessage(this); result.type_ = type_; if (timestampBuilder_ == null) { result.timestamp_ = timestamp_; } else { result.timestamp_ = timestampBuilder_.build(); } result.payload_ = payload_; result.txid_ = txid_; if (proposalBuilder_ == null) { result.proposal_ = proposal_; } else { result.proposal_ = proposalBuilder_.build(); } if (chaincodeEventBuilder_ == null) { result.chaincodeEvent_ = chaincodeEvent_; } else { result.chaincodeEvent_ = chaincodeEventBuilder_.build(); } result.channelId_ = channelId_; 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 org.hyperledger.fabric.protos.peer.ChaincodeMessage) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeMessage other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance()) return this; if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { setPayload(other.getPayload()); } if (!other.getTxid().isEmpty()) { txid_ = other.txid_; onChanged(); } if (other.hasProposal()) { mergeProposal(other.getProposal()); } if (other.hasChaincodeEvent()) { mergeChaincodeEvent(other.getChaincodeEvent()); } if (!other.getChannelId().isEmpty()) { channelId_ = other.channelId_; onChanged(); } 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 { org.hyperledger.fabric.protos.peer.ChaincodeMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int type_ = 0; /** * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"]; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"]; * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"]; * @return The type. */ @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type getType() { @SuppressWarnings("deprecation") org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.valueOf(type_); return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNRECOGNIZED : result; } /** * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"]; * @param value The type to set. * @return This builder for chaining. */ public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** * .protos.ChaincodeMessage.Type type = 1 [json_name = "type"]; * @return This builder for chaining. */ public Builder clearType() { type_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp timestamp_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { return timestampBuilder_ != null || timestamp_ != null; } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; * @return The timestamp. */ public com.google.protobuf.Timestamp getTimestamp() { if (timestampBuilder_ == null) { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } else { return timestampBuilder_.getMessage(); } } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public Builder setTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestamp_ = value; onChanged(); } else { timestampBuilder_.setMessage(value); } return this; } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public Builder setTimestamp( com.google.protobuf.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (timestamp_ != null) { timestamp_ = com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); } else { timestamp_ = value; } onChanged(); } else { timestampBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public Builder clearTimestamp() { if (timestampBuilder_ == null) { timestamp_ = null; onChanged(); } else { timestamp_ = null; timestampBuilder_ = null; } return this; } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { onChanged(); return getTimestampFieldBuilder().getBuilder(); } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { if (timestampBuilder_ != null) { return timestampBuilder_.getMessageOrBuilder(); } else { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } } /** * .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getTimestamp(), getParentForChildren(), isClean()); timestamp_ = null; } return timestampBuilder_; } private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * bytes payload = 3 [json_name = "payload"]; * @return The payload. */ @java.lang.Override public com.google.protobuf.ByteString getPayload() { return payload_; } /** * bytes payload = 3 [json_name = "payload"]; * @param value The payload to set. * @return This builder for chaining. */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; onChanged(); return this; } /** * bytes payload = 3 [json_name = "payload"]; * @return This builder for chaining. */ public Builder clearPayload() { payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } private java.lang.Object txid_ = ""; /** * string txid = 4 [json_name = "txid"]; * @return The txid. */ public java.lang.String getTxid() { java.lang.Object ref = txid_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); txid_ = s; return s; } else { return (java.lang.String) ref; } } /** * string txid = 4 [json_name = "txid"]; * @return The bytes for txid. */ public com.google.protobuf.ByteString getTxidBytes() { java.lang.Object ref = txid_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); txid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string txid = 4 [json_name = "txid"]; * @param value The txid to set. * @return This builder for chaining. */ public Builder setTxid( java.lang.String value) { if (value == null) { throw new NullPointerException(); } txid_ = value; onChanged(); return this; } /** * string txid = 4 [json_name = "txid"]; * @return This builder for chaining. */ public Builder clearTxid() { txid_ = getDefaultInstance().getTxid(); onChanged(); return this; } /** * string txid = 4 [json_name = "txid"]; * @param value The bytes for txid to set. * @return This builder for chaining. */ public Builder setTxidBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); txid_ = value; onChanged(); return this; } private org.hyperledger.fabric.protos.peer.SignedProposal proposal_; private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder> proposalBuilder_; /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; * @return Whether the proposal field is set. */ public boolean hasProposal() { return proposalBuilder_ != null || proposal_ != null; } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; * @return The proposal. */ public org.hyperledger.fabric.protos.peer.SignedProposal getProposal() { if (proposalBuilder_ == null) { return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_; } else { return proposalBuilder_.getMessage(); } } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public Builder setProposal(org.hyperledger.fabric.protos.peer.SignedProposal value) { if (proposalBuilder_ == null) { if (value == null) { throw new NullPointerException(); } proposal_ = value; onChanged(); } else { proposalBuilder_.setMessage(value); } return this; } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public Builder setProposal( org.hyperledger.fabric.protos.peer.SignedProposal.Builder builderForValue) { if (proposalBuilder_ == null) { proposal_ = builderForValue.build(); onChanged(); } else { proposalBuilder_.setMessage(builderForValue.build()); } return this; } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public Builder mergeProposal(org.hyperledger.fabric.protos.peer.SignedProposal value) { if (proposalBuilder_ == null) { if (proposal_ != null) { proposal_ = org.hyperledger.fabric.protos.peer.SignedProposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); } else { proposal_ = value; } onChanged(); } else { proposalBuilder_.mergeFrom(value); } return this; } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public Builder clearProposal() { if (proposalBuilder_ == null) { proposal_ = null; onChanged(); } else { proposal_ = null; proposalBuilder_ = null; } return this; } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public org.hyperledger.fabric.protos.peer.SignedProposal.Builder getProposalBuilder() { onChanged(); return getProposalFieldBuilder().getBuilder(); } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposalOrBuilder() { if (proposalBuilder_ != null) { return proposalBuilder_.getMessageOrBuilder(); } else { return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_; } } /** * .protos.SignedProposal proposal = 5 [json_name = "proposal"]; */ private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder> getProposalFieldBuilder() { if (proposalBuilder_ == null) { proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder>( getProposal(), getParentForChildren(), isClean()); proposal_ = null; } return proposalBuilder_; } private org.hyperledger.fabric.protos.peer.ChaincodeEvent chaincodeEvent_; private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder> chaincodeEventBuilder_; /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; * @return Whether the chaincodeEvent field is set. */ public boolean hasChaincodeEvent() { return chaincodeEventBuilder_ != null || chaincodeEvent_ != null; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; * @return The chaincodeEvent. */ public org.hyperledger.fabric.protos.peer.ChaincodeEvent getChaincodeEvent() { if (chaincodeEventBuilder_ == null) { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_; } else { return chaincodeEventBuilder_.getMessage(); } } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public Builder setChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEvent value) { if (chaincodeEventBuilder_ == null) { if (value == null) { throw new NullPointerException(); } chaincodeEvent_ = value; onChanged(); } else { chaincodeEventBuilder_.setMessage(value); } return this; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public Builder setChaincodeEvent( org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder builderForValue) { if (chaincodeEventBuilder_ == null) { chaincodeEvent_ = builderForValue.build(); onChanged(); } else { chaincodeEventBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public Builder mergeChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEvent value) { if (chaincodeEventBuilder_ == null) { if (chaincodeEvent_ != null) { chaincodeEvent_ = org.hyperledger.fabric.protos.peer.ChaincodeEvent.newBuilder(chaincodeEvent_).mergeFrom(value).buildPartial(); } else { chaincodeEvent_ = value; } onChanged(); } else { chaincodeEventBuilder_.mergeFrom(value); } return this; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public Builder clearChaincodeEvent() { if (chaincodeEventBuilder_ == null) { chaincodeEvent_ = null; onChanged(); } else { chaincodeEvent_ = null; chaincodeEventBuilder_ = null; } return this; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder getChaincodeEventBuilder() { onChanged(); return getChaincodeEventFieldBuilder().getBuilder(); } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() { if (chaincodeEventBuilder_ != null) { return chaincodeEventBuilder_.getMessageOrBuilder(); } else { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_; } } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"]; */ private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder> getChaincodeEventFieldBuilder() { if (chaincodeEventBuilder_ == null) { chaincodeEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder>( getChaincodeEvent(), getParentForChildren(), isClean()); chaincodeEvent_ = null; } return chaincodeEventBuilder_; } private java.lang.Object channelId_ = ""; /** *
     *channel id
     * 
* * string channel_id = 7 [json_name = "channelId"]; * @return The channelId. */ public java.lang.String getChannelId() { java.lang.Object ref = channelId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channelId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     *channel id
     * 
* * string channel_id = 7 [json_name = "channelId"]; * @return The bytes for channelId. */ public com.google.protobuf.ByteString getChannelIdBytes() { java.lang.Object ref = channelId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); channelId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     *channel id
     * 
* * string channel_id = 7 [json_name = "channelId"]; * @param value The channelId to set. * @return This builder for chaining. */ public Builder setChannelId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } channelId_ = value; onChanged(); return this; } /** *
     *channel id
     * 
* * string channel_id = 7 [json_name = "channelId"]; * @return This builder for chaining. */ public Builder clearChannelId() { channelId_ = getDefaultInstance().getChannelId(); onChanged(); return this; } /** *
     *channel id
     * 
* * string channel_id = 7 [json_name = "channelId"]; * @param value The bytes for channelId to set. * @return This builder for chaining. */ public Builder setChannelIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); channelId_ = value; 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:protos.ChaincodeMessage) } // @@protoc_insertion_point(class_scope:protos.ChaincodeMessage) private static final org.hyperledger.fabric.protos.peer.ChaincodeMessage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeMessage(); } public static org.hyperledger.fabric.protos.peer.ChaincodeMessage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ChaincodeMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ChaincodeMessage(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy