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

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

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

package org.hyperledger.fabric.protos.peer;

public final class ChaincodeShim {
  private ChaincodeShim() {}
  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 ChaincodeMessageOrBuilder extends
      // @@protoc_insertion_point(interface_extends:protos.ChaincodeMessage)
      com.google.protobuf.MessageOrBuilder {

    /**
     * optional .protos.ChaincodeMessage.Type type = 1;
     */
    int getTypeValue();
    /**
     * optional .protos.ChaincodeMessage.Type type = 1;
     */
    org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType();

    /**
     * optional .google.protobuf.Timestamp timestamp = 2;
     */
    boolean hasTimestamp();
    /**
     * optional .google.protobuf.Timestamp timestamp = 2;
     */
    com.google.protobuf.Timestamp getTimestamp();
    /**
     * optional .google.protobuf.Timestamp timestamp = 2;
     */
    com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();

    /**
     * optional bytes payload = 3;
     */
    com.google.protobuf.ByteString getPayload();

    /**
     * optional string txid = 4;
     */
    java.lang.String getTxid();
    /**
     * optional string txid = 4;
     */
    com.google.protobuf.ByteString
        getTxidBytes();

    /**
     * optional .protos.SignedProposal proposal = 5;
     */
    boolean hasProposal();
    /**
     * optional .protos.SignedProposal proposal = 5;
     */
    org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal();
    /**
     * optional .protos.SignedProposal proposal = 5;
     */
    org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder();

    /**
     * 
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ boolean hasChaincodeEvent(); /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent(); /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder(); /** *
     *channel id
     * 
* * optional string channel_id = 7; */ java.lang.String getChannelId(); /** *
     *channel id
     * 
* * optional string channel_id = 7; */ com.google.protobuf.ByteString getChannelIdBytes(); } /** * Protobuf type {@code protos.ChaincodeMessage} */ public static final class ChaincodeMessage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.ChaincodeMessage) ChaincodeMessageOrBuilder { // 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 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private ChaincodeMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { 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.ProposalPackage.SignedProposal.Builder subBuilder = null; if (proposal_ != null) { subBuilder = proposal_.toBuilder(); } proposal_ = input.readMessage(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(proposal_); proposal_ = subBuilder.buildPartial(); } break; } case 50: { org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder subBuilder = null; if (chaincodeEvent_ != null) { subBuilder = chaincodeEvent_.toBuilder(); } chaincodeEvent_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(chaincodeEvent_); chaincodeEvent_ = subBuilder.buildPartial(); } break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); channelId_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.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), 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; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(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; 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() { 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.ChaincodeShim.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_; /** * optional .protos.ChaincodeMessage.Type type = 1; */ public int getTypeValue() { return type_; } /** * optional .protos.ChaincodeMessage.Type type = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() { org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.valueOf(type_); return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNRECOGNIZED : result; } public static final int TIMESTAMP_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp timestamp_; /** * optional .google.protobuf.Timestamp timestamp = 2; */ public boolean hasTimestamp() { return timestamp_ != null; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public com.google.protobuf.Timestamp getTimestamp() { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { return getTimestamp(); } public static final int PAYLOAD_FIELD_NUMBER = 3; private com.google.protobuf.ByteString payload_; /** * optional bytes payload = 3; */ public com.google.protobuf.ByteString getPayload() { return payload_; } public static final int TXID_FIELD_NUMBER = 4; private volatile java.lang.Object txid_; /** * optional string txid = 4; */ 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; } } /** * optional string txid = 4; */ 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.ProposalPackage.SignedProposal proposal_; /** * optional .protos.SignedProposal proposal = 5; */ public boolean hasProposal() { return proposal_ != null; } /** * optional .protos.SignedProposal proposal = 5; */ public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal() { return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_; } /** * optional .protos.SignedProposal proposal = 5; */ public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder() { return getProposal(); } public static final int CHAINCODE_EVENT_FIELD_NUMBER = 6; private org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent chaincodeEvent_; /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ 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
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent() { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_; } /** *
     *event emitted by chaincode. Used only with Init or Invoke.
     * This event is then stored (currently)
     *with Block.NonHashData.TransactionResult
     * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() { return getChaincodeEvent(); } public static final int CHANNEL_ID_FIELD_NUMBER = 7; private volatile java.lang.Object channelId_; /** *
     *channel id
     * 
* * optional string channel_id = 7; */ 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
     * 
* * optional string channel_id = 7; */ 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; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNDEFINED.getNumber()) { output.writeEnum(1, type_); } if (timestamp_ != null) { output.writeMessage(2, getTimestamp()); } if (!payload_.isEmpty()) { output.writeBytes(3, payload_); } if (!getTxidBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, txid_); } if (proposal_ != null) { output.writeMessage(5, getProposal()); } if (chaincodeEvent_ != null) { output.writeMessage(6, getChaincodeEvent()); } if (!getChannelIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, channelId_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.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 (!getTxidBytes().isEmpty()) { 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 (!getChannelIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, channelId_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) obj; boolean result = true; result = result && type_ == other.type_; result = result && (hasTimestamp() == other.hasTimestamp()); if (hasTimestamp()) { result = result && getTimestamp() .equals(other.getTimestamp()); } result = result && getPayload() .equals(other.getPayload()); result = result && getTxid() .equals(other.getTxid()); result = result && (hasProposal() == other.hasProposal()); if (hasProposal()) { result = result && getProposal() .equals(other.getProposal()); } result = result && (hasChaincodeEvent() == other.hasChaincodeEvent()); if (hasChaincodeEvent()) { result = result && getChaincodeEvent() .equals(other.getChaincodeEvent()); } result = result && getChannelId() .equals(other.getChannelId()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().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.ChaincodeShim.ChaincodeMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.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.ChaincodeShim.ChaincodeMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.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.ChaincodeShim.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.ChaincodeShim.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.ChaincodeShim.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.ChaincodeShim.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.ChaincodeShim.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.ChaincodeShim.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); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.ChaincodeShim.ChaincodeMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.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) { } } 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; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.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; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.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(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int type_ = 0; /** * optional .protos.ChaincodeMessage.Type type = 1; */ public int getTypeValue() { return type_; } /** * optional .protos.ChaincodeMessage.Type type = 1; */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** * optional .protos.ChaincodeMessage.Type type = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() { org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.valueOf(type_); return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNRECOGNIZED : result; } /** * optional .protos.ChaincodeMessage.Type type = 1; */ public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** * optional .protos.ChaincodeMessage.Type type = 1; */ public Builder clearType() { type_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp timestamp_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; /** * optional .google.protobuf.Timestamp timestamp = 2; */ public boolean hasTimestamp() { return timestampBuilder_ != null || timestamp_ != null; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public com.google.protobuf.Timestamp getTimestamp() { if (timestampBuilder_ == null) { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } else { return timestampBuilder_.getMessage(); } } /** * optional .google.protobuf.Timestamp timestamp = 2; */ 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; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public Builder setTimestamp( com.google.protobuf.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } return this; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ 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; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public Builder clearTimestamp() { if (timestampBuilder_ == null) { timestamp_ = null; onChanged(); } else { timestamp_ = null; timestampBuilder_ = null; } return this; } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { onChanged(); return getTimestampFieldBuilder().getBuilder(); } /** * optional .google.protobuf.Timestamp timestamp = 2; */ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { if (timestampBuilder_ != null) { return timestampBuilder_.getMessageOrBuilder(); } else { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } } /** * optional .google.protobuf.Timestamp timestamp = 2; */ 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; /** * optional bytes payload = 3; */ public com.google.protobuf.ByteString getPayload() { return payload_; } /** * optional bytes payload = 3; */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; onChanged(); return this; } /** * optional bytes payload = 3; */ public Builder clearPayload() { payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } private java.lang.Object txid_ = ""; /** * optional string txid = 4; */ 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; } } /** * optional string txid = 4; */ 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; } } /** * optional string txid = 4; */ public Builder setTxid( java.lang.String value) { if (value == null) { throw new NullPointerException(); } txid_ = value; onChanged(); return this; } /** * optional string txid = 4; */ public Builder clearTxid() { txid_ = getDefaultInstance().getTxid(); onChanged(); return this; } /** * optional string txid = 4; */ 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.ProposalPackage.SignedProposal proposal_ = null; private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder> proposalBuilder_; /** * optional .protos.SignedProposal proposal = 5; */ public boolean hasProposal() { return proposalBuilder_ != null || proposal_ != null; } /** * optional .protos.SignedProposal proposal = 5; */ public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal() { if (proposalBuilder_ == null) { return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_; } else { return proposalBuilder_.getMessage(); } } /** * optional .protos.SignedProposal proposal = 5; */ public Builder setProposal(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal value) { if (proposalBuilder_ == null) { if (value == null) { throw new NullPointerException(); } proposal_ = value; onChanged(); } else { proposalBuilder_.setMessage(value); } return this; } /** * optional .protos.SignedProposal proposal = 5; */ public Builder setProposal( org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder builderForValue) { if (proposalBuilder_ == null) { proposal_ = builderForValue.build(); onChanged(); } else { proposalBuilder_.setMessage(builderForValue.build()); } return this; } /** * optional .protos.SignedProposal proposal = 5; */ public Builder mergeProposal(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal value) { if (proposalBuilder_ == null) { if (proposal_ != null) { proposal_ = org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); } else { proposal_ = value; } onChanged(); } else { proposalBuilder_.mergeFrom(value); } return this; } /** * optional .protos.SignedProposal proposal = 5; */ public Builder clearProposal() { if (proposalBuilder_ == null) { proposal_ = null; onChanged(); } else { proposal_ = null; proposalBuilder_ = null; } return this; } /** * optional .protos.SignedProposal proposal = 5; */ public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder getProposalBuilder() { onChanged(); return getProposalFieldBuilder().getBuilder(); } /** * optional .protos.SignedProposal proposal = 5; */ public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder() { if (proposalBuilder_ != null) { return proposalBuilder_.getMessageOrBuilder(); } else { return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_; } } /** * optional .protos.SignedProposal proposal = 5; */ private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder> getProposalFieldBuilder() { if (proposalBuilder_ == null) { proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder>( getProposal(), getParentForChildren(), isClean()); proposal_ = null; } return proposalBuilder_; } private org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent chaincodeEvent_ = null; private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder> chaincodeEventBuilder_; /** *
       *event emitted by chaincode. Used only with Init or Invoke.
       * This event is then stored (currently)
       *with Block.NonHashData.TransactionResult
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ 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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent() { if (chaincodeEventBuilder_ == null) { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public Builder setChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public Builder setChaincodeEvent( org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public Builder mergeChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent value) { if (chaincodeEventBuilder_ == null) { if (chaincodeEvent_ != null) { chaincodeEvent_ = org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ 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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.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
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() { if (chaincodeEventBuilder_ != null) { return chaincodeEventBuilder_.getMessageOrBuilder(); } else { return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_; } } /** *
       *event emitted by chaincode. Used only with Init or Invoke.
       * This event is then stored (currently)
       *with Block.NonHashData.TransactionResult
       * 
* * optional .protos.ChaincodeEvent chaincode_event = 6; */ private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder> getChaincodeEventFieldBuilder() { if (chaincodeEventBuilder_ == null) { chaincodeEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder>( getChaincodeEvent(), getParentForChildren(), isClean()); chaincodeEvent_ = null; } return chaincodeEventBuilder_; } private java.lang.Object channelId_ = ""; /** *
       *channel id
       * 
* * optional string channel_id = 7; */ 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
       * 
* * optional string channel_id = 7; */ 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
       * 
* * optional string channel_id = 7; */ public Builder setChannelId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } channelId_ = value; onChanged(); return this; } /** *
       *channel id
       * 
* * optional string channel_id = 7; */ public Builder clearChannelId() { channelId_ = getDefaultInstance().getChannelId(); onChanged(); return this; } /** *
       *channel id
       * 
* * optional string channel_id = 7; */ public Builder setChannelIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); channelId_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.ChaincodeMessage) } // @@protoc_insertion_point(class_scope:protos.ChaincodeMessage) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { 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; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetStateOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.GetState) com.google.protobuf.MessageOrBuilder { /** * optional string key = 1; */ java.lang.String getKey(); /** * optional string key = 1; */ com.google.protobuf.ByteString getKeyBytes(); /** * optional string collection = 2; */ java.lang.String getCollection(); /** * optional string collection = 2; */ com.google.protobuf.ByteString getCollectionBytes(); } /** * Protobuf type {@code protos.GetState} */ public static final class GetState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.GetState) GetStateOrBuilder { // Use GetState.newBuilder() to construct. private GetState(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetState() { key_ = ""; collection_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private GetState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); key_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); collection_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; 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(); key_ = s; return s; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COLLECTION_FIELD_NUMBER = 2; private volatile java.lang.Object collection_; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; 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(); collection_ = s; return s; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (!getCollectionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!getCollectionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); result = result && getCollection() .equals(other.getCollection()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState 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.ChaincodeShim.GetState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState 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.ChaincodeShim.GetState parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState 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.ChaincodeShim.GetState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState 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.ChaincodeShim.GetState 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.ChaincodeShim.GetState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.GetState} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.GetState) org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); key_ = ""; collection_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState(this); result.key_ = key_; result.collection_ = collection_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } if (!other.getCollection().isEmpty()) { collection_ = other.collection_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object key_ = ""; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string key = 1; */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** * optional string key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * optional string key = 1; */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; onChanged(); return this; } private java.lang.Object collection_ = ""; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string collection = 2; */ public Builder setCollection( java.lang.String value) { if (value == null) { throw new NullPointerException(); } collection_ = value; onChanged(); return this; } /** * optional string collection = 2; */ public Builder clearCollection() { collection_ = getDefaultInstance().getCollection(); onChanged(); return this; } /** * optional string collection = 2; */ public Builder setCollectionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collection_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.GetState) } // @@protoc_insertion_point(class_scope:protos.GetState) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public GetState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetState(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PutStateOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.PutState) com.google.protobuf.MessageOrBuilder { /** * optional string key = 1; */ java.lang.String getKey(); /** * optional string key = 1; */ com.google.protobuf.ByteString getKeyBytes(); /** * optional bytes value = 2; */ com.google.protobuf.ByteString getValue(); /** * optional string collection = 3; */ java.lang.String getCollection(); /** * optional string collection = 3; */ com.google.protobuf.ByteString getCollectionBytes(); } /** * Protobuf type {@code protos.PutState} */ public static final class PutState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.PutState) PutStateOrBuilder { // Use PutState.newBuilder() to construct. private PutState(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PutState() { key_ = ""; value_ = com.google.protobuf.ByteString.EMPTY; collection_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private PutState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); key_ = s; break; } case 18: { value_ = input.readBytes(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); collection_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; 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(); key_ = s; return s; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString value_; /** * optional bytes value = 2; */ public com.google.protobuf.ByteString getValue() { return value_; } public static final int COLLECTION_FIELD_NUMBER = 3; private volatile java.lang.Object collection_; /** * optional string collection = 3; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; 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(); collection_ = s; return s; } } /** * optional string collection = 3; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (!value_.isEmpty()) { output.writeBytes(2, value_); } if (!getCollectionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, value_); } if (!getCollectionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collection_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); result = result && getValue() .equals(other.getValue()); result = result && getCollection() .equals(other.getCollection()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState 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.ChaincodeShim.PutState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState 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.ChaincodeShim.PutState parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState 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.ChaincodeShim.PutState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState 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.ChaincodeShim.PutState 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.ChaincodeShim.PutState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.PutState} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.PutState) org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); key_ = ""; value_ = com.google.protobuf.ByteString.EMPTY; collection_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState(this); result.key_ = key_; result.value_ = value_; result.collection_ = collection_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } if (!other.getCollection().isEmpty()) { collection_ = other.collection_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object key_ = ""; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string key = 1; */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** * optional string key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * optional string key = 1; */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; onChanged(); return this; } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes value = 2; */ public com.google.protobuf.ByteString getValue() { return value_; } /** * optional bytes value = 2; */ public Builder setValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /** * optional bytes value = 2; */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } private java.lang.Object collection_ = ""; /** * optional string collection = 3; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string collection = 3; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string collection = 3; */ public Builder setCollection( java.lang.String value) { if (value == null) { throw new NullPointerException(); } collection_ = value; onChanged(); return this; } /** * optional string collection = 3; */ public Builder clearCollection() { collection_ = getDefaultInstance().getCollection(); onChanged(); return this; } /** * optional string collection = 3; */ public Builder setCollectionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collection_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.PutState) } // @@protoc_insertion_point(class_scope:protos.PutState) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public PutState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PutState(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DelStateOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.DelState) com.google.protobuf.MessageOrBuilder { /** * optional string key = 1; */ java.lang.String getKey(); /** * optional string key = 1; */ com.google.protobuf.ByteString getKeyBytes(); /** * optional string collection = 2; */ java.lang.String getCollection(); /** * optional string collection = 2; */ com.google.protobuf.ByteString getCollectionBytes(); } /** * Protobuf type {@code protos.DelState} */ public static final class DelState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.DelState) DelStateOrBuilder { // Use DelState.newBuilder() to construct. private DelState(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DelState() { key_ = ""; collection_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private DelState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); key_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); collection_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; 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(); key_ = s; return s; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COLLECTION_FIELD_NUMBER = 2; private volatile java.lang.Object collection_; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; 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(); collection_ = s; return s; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (!getCollectionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!getCollectionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); result = result && getCollection() .equals(other.getCollection()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState 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.ChaincodeShim.DelState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState 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.ChaincodeShim.DelState parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState 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.ChaincodeShim.DelState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState 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.ChaincodeShim.DelState 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.ChaincodeShim.DelState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.DelState} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.DelState) org.hyperledger.fabric.protos.peer.ChaincodeShim.DelStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); key_ = ""; collection_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState(this); result.key_ = key_; result.collection_ = collection_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } if (!other.getCollection().isEmpty()) { collection_ = other.collection_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object key_ = ""; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string key = 1; */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** * optional string key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * optional string key = 1; */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; onChanged(); return this; } private java.lang.Object collection_ = ""; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string collection = 2; */ public Builder setCollection( java.lang.String value) { if (value == null) { throw new NullPointerException(); } collection_ = value; onChanged(); return this; } /** * optional string collection = 2; */ public Builder clearCollection() { collection_ = getDefaultInstance().getCollection(); onChanged(); return this; } /** * optional string collection = 2; */ public Builder setCollectionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collection_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.DelState) } // @@protoc_insertion_point(class_scope:protos.DelState) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public DelState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DelState(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetStateByRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.GetStateByRange) com.google.protobuf.MessageOrBuilder { /** * optional string startKey = 1; */ java.lang.String getStartKey(); /** * optional string startKey = 1; */ com.google.protobuf.ByteString getStartKeyBytes(); /** * optional string endKey = 2; */ java.lang.String getEndKey(); /** * optional string endKey = 2; */ com.google.protobuf.ByteString getEndKeyBytes(); /** * optional string collection = 3; */ java.lang.String getCollection(); /** * optional string collection = 3; */ com.google.protobuf.ByteString getCollectionBytes(); } /** * Protobuf type {@code protos.GetStateByRange} */ public static final class GetStateByRange extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.GetStateByRange) GetStateByRangeOrBuilder { // Use GetStateByRange.newBuilder() to construct. private GetStateByRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetStateByRange() { startKey_ = ""; endKey_ = ""; collection_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private GetStateByRange( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); startKey_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); endKey_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); collection_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.Builder.class); } public static final int STARTKEY_FIELD_NUMBER = 1; private volatile java.lang.Object startKey_; /** * optional string startKey = 1; */ public java.lang.String getStartKey() { java.lang.Object ref = startKey_; 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(); startKey_ = s; return s; } } /** * optional string startKey = 1; */ public com.google.protobuf.ByteString getStartKeyBytes() { java.lang.Object ref = startKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); startKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ENDKEY_FIELD_NUMBER = 2; private volatile java.lang.Object endKey_; /** * optional string endKey = 2; */ public java.lang.String getEndKey() { java.lang.Object ref = endKey_; 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(); endKey_ = s; return s; } } /** * optional string endKey = 2; */ public com.google.protobuf.ByteString getEndKeyBytes() { java.lang.Object ref = endKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); endKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COLLECTION_FIELD_NUMBER = 3; private volatile java.lang.Object collection_; /** * optional string collection = 3; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; 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(); collection_ = s; return s; } } /** * optional string collection = 3; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getStartKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startKey_); } if (!getEndKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endKey_); } if (!getCollectionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getStartKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startKey_); } if (!getEndKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endKey_); } if (!getCollectionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collection_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange) obj; boolean result = true; result = result && getStartKey() .equals(other.getStartKey()); result = result && getEndKey() .equals(other.getEndKey()); result = result && getCollection() .equals(other.getCollection()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + STARTKEY_FIELD_NUMBER; hash = (53 * hash) + getStartKey().hashCode(); hash = (37 * hash) + ENDKEY_FIELD_NUMBER; hash = (53 * hash) + getEndKey().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange 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.ChaincodeShim.GetStateByRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange 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.ChaincodeShim.GetStateByRange parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange 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.ChaincodeShim.GetStateByRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange 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.ChaincodeShim.GetStateByRange 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.ChaincodeShim.GetStateByRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.GetStateByRange} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.GetStateByRange) org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); startKey_ = ""; endKey_ = ""; collection_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange(this); result.startKey_ = startKey_; result.endKey_ = endKey_; result.collection_ = collection_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.getDefaultInstance()) return this; if (!other.getStartKey().isEmpty()) { startKey_ = other.startKey_; onChanged(); } if (!other.getEndKey().isEmpty()) { endKey_ = other.endKey_; onChanged(); } if (!other.getCollection().isEmpty()) { collection_ = other.collection_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object startKey_ = ""; /** * optional string startKey = 1; */ public java.lang.String getStartKey() { java.lang.Object ref = startKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); startKey_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string startKey = 1; */ public com.google.protobuf.ByteString getStartKeyBytes() { java.lang.Object ref = startKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); startKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string startKey = 1; */ public Builder setStartKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } startKey_ = value; onChanged(); return this; } /** * optional string startKey = 1; */ public Builder clearStartKey() { startKey_ = getDefaultInstance().getStartKey(); onChanged(); return this; } /** * optional string startKey = 1; */ public Builder setStartKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); startKey_ = value; onChanged(); return this; } private java.lang.Object endKey_ = ""; /** * optional string endKey = 2; */ public java.lang.String getEndKey() { java.lang.Object ref = endKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); endKey_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string endKey = 2; */ public com.google.protobuf.ByteString getEndKeyBytes() { java.lang.Object ref = endKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); endKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string endKey = 2; */ public Builder setEndKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } endKey_ = value; onChanged(); return this; } /** * optional string endKey = 2; */ public Builder clearEndKey() { endKey_ = getDefaultInstance().getEndKey(); onChanged(); return this; } /** * optional string endKey = 2; */ public Builder setEndKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); endKey_ = value; onChanged(); return this; } private java.lang.Object collection_ = ""; /** * optional string collection = 3; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string collection = 3; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string collection = 3; */ public Builder setCollection( java.lang.String value) { if (value == null) { throw new NullPointerException(); } collection_ = value; onChanged(); return this; } /** * optional string collection = 3; */ public Builder clearCollection() { collection_ = getDefaultInstance().getCollection(); onChanged(); return this; } /** * optional string collection = 3; */ public Builder setCollectionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collection_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.GetStateByRange) } // @@protoc_insertion_point(class_scope:protos.GetStateByRange) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public GetStateByRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetStateByRange(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetQueryResultOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.GetQueryResult) com.google.protobuf.MessageOrBuilder { /** * optional string query = 1; */ java.lang.String getQuery(); /** * optional string query = 1; */ com.google.protobuf.ByteString getQueryBytes(); /** * optional string collection = 2; */ java.lang.String getCollection(); /** * optional string collection = 2; */ com.google.protobuf.ByteString getCollectionBytes(); } /** * Protobuf type {@code protos.GetQueryResult} */ public static final class GetQueryResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.GetQueryResult) GetQueryResultOrBuilder { // Use GetQueryResult.newBuilder() to construct. private GetQueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetQueryResult() { query_ = ""; collection_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private GetQueryResult( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); query_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); collection_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.Builder.class); } public static final int QUERY_FIELD_NUMBER = 1; private volatile java.lang.Object query_; /** * optional string query = 1; */ public java.lang.String getQuery() { java.lang.Object ref = query_; 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(); query_ = s; return s; } } /** * optional string query = 1; */ public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COLLECTION_FIELD_NUMBER = 2; private volatile java.lang.Object collection_; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; 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(); collection_ = s; return s; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getQueryBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_); } if (!getCollectionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getQueryBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_); } if (!getCollectionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult) obj; boolean result = true; result = result && getQuery() .equals(other.getQuery()); result = result && getCollection() .equals(other.getCollection()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult 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.ChaincodeShim.GetQueryResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult 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.ChaincodeShim.GetQueryResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult 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.ChaincodeShim.GetQueryResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult 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.ChaincodeShim.GetQueryResult 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.ChaincodeShim.GetQueryResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.GetQueryResult} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.GetQueryResult) org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); query_ = ""; collection_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult(this); result.query_ = query_; result.collection_ = collection_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.getDefaultInstance()) return this; if (!other.getQuery().isEmpty()) { query_ = other.query_; onChanged(); } if (!other.getCollection().isEmpty()) { collection_ = other.collection_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object query_ = ""; /** * optional string query = 1; */ public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string query = 1; */ public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string query = 1; */ public Builder setQuery( java.lang.String value) { if (value == null) { throw new NullPointerException(); } query_ = value; onChanged(); return this; } /** * optional string query = 1; */ public Builder clearQuery() { query_ = getDefaultInstance().getQuery(); onChanged(); return this; } /** * optional string query = 1; */ public Builder setQueryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); query_ = value; onChanged(); return this; } private java.lang.Object collection_ = ""; /** * optional string collection = 2; */ public java.lang.String getCollection() { java.lang.Object ref = collection_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string collection = 2; */ public com.google.protobuf.ByteString getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string collection = 2; */ public Builder setCollection( java.lang.String value) { if (value == null) { throw new NullPointerException(); } collection_ = value; onChanged(); return this; } /** * optional string collection = 2; */ public Builder clearCollection() { collection_ = getDefaultInstance().getCollection(); onChanged(); return this; } /** * optional string collection = 2; */ public Builder setCollectionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); collection_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.GetQueryResult) } // @@protoc_insertion_point(class_scope:protos.GetQueryResult) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public GetQueryResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetQueryResult(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetHistoryForKeyOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.GetHistoryForKey) com.google.protobuf.MessageOrBuilder { /** * optional string key = 1; */ java.lang.String getKey(); /** * optional string key = 1; */ com.google.protobuf.ByteString getKeyBytes(); } /** * Protobuf type {@code protos.GetHistoryForKey} */ public static final class GetHistoryForKey extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.GetHistoryForKey) GetHistoryForKeyOrBuilder { // Use GetHistoryForKey.newBuilder() to construct. private GetHistoryForKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetHistoryForKey() { key_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private GetHistoryForKey( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); key_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; 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(); key_ = s; return s; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey 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.ChaincodeShim.GetHistoryForKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey 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.ChaincodeShim.GetHistoryForKey parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey 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.ChaincodeShim.GetHistoryForKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey 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.ChaincodeShim.GetHistoryForKey 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.ChaincodeShim.GetHistoryForKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.GetHistoryForKey} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.GetHistoryForKey) org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); key_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey(this); result.key_ = key_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object key_ = ""; /** * optional string key = 1; */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string key = 1; */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string key = 1; */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** * optional string key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * optional string key = 1; */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.GetHistoryForKey) } // @@protoc_insertion_point(class_scope:protos.GetHistoryForKey) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public GetHistoryForKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetHistoryForKey(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QueryStateNextOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.QueryStateNext) com.google.protobuf.MessageOrBuilder { /** * optional string id = 1; */ java.lang.String getId(); /** * optional string id = 1; */ com.google.protobuf.ByteString getIdBytes(); } /** * Protobuf type {@code protos.QueryStateNext} */ public static final class QueryStateNext extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.QueryStateNext) QueryStateNextOrBuilder { // Use QueryStateNext.newBuilder() to construct. private QueryStateNext(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QueryStateNext() { id_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private QueryStateNext( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** * optional string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * optional string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext) obj; boolean result = true; result = result && getId() .equals(other.getId()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext 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.ChaincodeShim.QueryStateNext parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext 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.ChaincodeShim.QueryStateNext parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext 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.ChaincodeShim.QueryStateNext parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext 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.ChaincodeShim.QueryStateNext 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.ChaincodeShim.QueryStateNext parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.QueryStateNext} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.QueryStateNext) org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNextOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); id_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext(this); result.id_ = id_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** * optional string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string id = 1; */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** * optional string id = 1; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** * optional string id = 1; */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.QueryStateNext) } // @@protoc_insertion_point(class_scope:protos.QueryStateNext) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public QueryStateNext parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QueryStateNext(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QueryStateCloseOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.QueryStateClose) com.google.protobuf.MessageOrBuilder { /** * optional string id = 1; */ java.lang.String getId(); /** * optional string id = 1; */ com.google.protobuf.ByteString getIdBytes(); } /** * Protobuf type {@code protos.QueryStateClose} */ public static final class QueryStateClose extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.QueryStateClose) QueryStateCloseOrBuilder { // Use QueryStateClose.newBuilder() to construct. private QueryStateClose(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QueryStateClose() { id_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private QueryStateClose( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** * optional string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * optional string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose) obj; boolean result = true; result = result && getId() .equals(other.getId()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose 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.ChaincodeShim.QueryStateClose parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose 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.ChaincodeShim.QueryStateClose parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose 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.ChaincodeShim.QueryStateClose parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose 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.ChaincodeShim.QueryStateClose 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.ChaincodeShim.QueryStateClose parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.QueryStateClose} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.QueryStateClose) org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateCloseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); id_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose(this); result.id_ = id_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** * optional string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string id = 1; */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** * optional string id = 1; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** * optional string id = 1; */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.QueryStateClose) } // @@protoc_insertion_point(class_scope:protos.QueryStateClose) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public QueryStateClose parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QueryStateClose(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QueryResultBytesOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.QueryResultBytes) com.google.protobuf.MessageOrBuilder { /** * optional bytes resultBytes = 1; */ com.google.protobuf.ByteString getResultBytes(); } /** * Protobuf type {@code protos.QueryResultBytes} */ public static final class QueryResultBytes extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.QueryResultBytes) QueryResultBytesOrBuilder { // Use QueryResultBytes.newBuilder() to construct. private QueryResultBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QueryResultBytes() { resultBytes_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private QueryResultBytes( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { resultBytes_ = input.readBytes(); 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 { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder.class); } public static final int RESULTBYTES_FIELD_NUMBER = 1; private com.google.protobuf.ByteString resultBytes_; /** * optional bytes resultBytes = 1; */ public com.google.protobuf.ByteString getResultBytes() { return resultBytes_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!resultBytes_.isEmpty()) { output.writeBytes(1, resultBytes_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!resultBytes_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, resultBytes_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes) obj; boolean result = true; result = result && getResultBytes() .equals(other.getResultBytes()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + RESULTBYTES_FIELD_NUMBER; hash = (53 * hash) + getResultBytes().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes 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.ChaincodeShim.QueryResultBytes parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes 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.ChaincodeShim.QueryResultBytes parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes 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.ChaincodeShim.QueryResultBytes parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes 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.ChaincodeShim.QueryResultBytes 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.ChaincodeShim.QueryResultBytes parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.QueryResultBytes} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.QueryResultBytes) org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); resultBytes_ = com.google.protobuf.ByteString.EMPTY; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes(this); result.resultBytes_ = resultBytes_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.getDefaultInstance()) return this; if (other.getResultBytes() != com.google.protobuf.ByteString.EMPTY) { setResultBytes(other.getResultBytes()); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString resultBytes_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes resultBytes = 1; */ public com.google.protobuf.ByteString getResultBytes() { return resultBytes_; } /** * optional bytes resultBytes = 1; */ public Builder setResultBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } resultBytes_ = value; onChanged(); return this; } /** * optional bytes resultBytes = 1; */ public Builder clearResultBytes() { resultBytes_ = getDefaultInstance().getResultBytes(); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.QueryResultBytes) } // @@protoc_insertion_point(class_scope:protos.QueryResultBytes) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public QueryResultBytes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QueryResultBytes(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QueryResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:protos.QueryResponse) com.google.protobuf.MessageOrBuilder { /** * repeated .protos.QueryResultBytes results = 1; */ java.util.List getResultsList(); /** * repeated .protos.QueryResultBytes results = 1; */ org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getResults(int index); /** * repeated .protos.QueryResultBytes results = 1; */ int getResultsCount(); /** * repeated .protos.QueryResultBytes results = 1; */ java.util.List getResultsOrBuilderList(); /** * repeated .protos.QueryResultBytes results = 1; */ org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder getResultsOrBuilder( int index); /** * optional bool has_more = 2; */ boolean getHasMore(); /** * optional string id = 3; */ java.lang.String getId(); /** * optional string id = 3; */ com.google.protobuf.ByteString getIdBytes(); } /** * Protobuf type {@code protos.QueryResponse} */ public static final class QueryResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.QueryResponse) QueryResponseOrBuilder { // Use QueryResponse.newBuilder() to construct. private QueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QueryResponse() { results_ = java.util.Collections.emptyList(); hasMore_ = false; id_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private QueryResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { results_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } results_.add( input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.parser(), extensionRegistry)); break; } case 16: { hasMore_ = input.readBool(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; 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 { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { results_ = java.util.Collections.unmodifiableList(results_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.Builder.class); } private int bitField0_; public static final int RESULTS_FIELD_NUMBER = 1; private java.util.List results_; /** * repeated .protos.QueryResultBytes results = 1; */ public java.util.List getResultsList() { return results_; } /** * repeated .protos.QueryResultBytes results = 1; */ public java.util.List getResultsOrBuilderList() { return results_; } /** * repeated .protos.QueryResultBytes results = 1; */ public int getResultsCount() { return results_.size(); } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getResults(int index) { return results_.get(index); } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder getResultsOrBuilder( int index) { return results_.get(index); } public static final int HAS_MORE_FIELD_NUMBER = 2; private boolean hasMore_; /** * optional bool has_more = 2; */ public boolean getHasMore() { return hasMore_; } public static final int ID_FIELD_NUMBER = 3; private volatile java.lang.Object id_; /** * optional string id = 3; */ public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * optional string id = 3; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < results_.size(); i++) { output.writeMessage(1, results_.get(i)); } if (hasMore_ != false) { output.writeBool(2, hasMore_); } if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < results_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, results_.get(i)); } if (hasMore_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, hasMore_); } if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse) obj; boolean result = true; result = result && getResultsList() .equals(other.getResultsList()); result = result && (getHasMore() == other.getHasMore()); result = result && getId() .equals(other.getId()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getResultsCount() > 0) { hash = (37 * hash) + RESULTS_FIELD_NUMBER; hash = (53 * hash) + getResultsList().hashCode(); } hash = (37 * hash) + HAS_MORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasMore()); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse 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.ChaincodeShim.QueryResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse 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.ChaincodeShim.QueryResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse 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.ChaincodeShim.QueryResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse 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.ChaincodeShim.QueryResponse 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.ChaincodeShim.QueryResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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.QueryResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.QueryResponse) org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.Builder.class); } // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getResultsFieldBuilder(); } } public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { resultsBuilder_.clear(); } hasMore_ = false; id_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_descriptor; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.getDefaultInstance(); } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse build() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse buildPartial() { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (resultsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000001); } result.results_ = results_; } else { result.results_ = resultsBuilder_.build(); } result.hasMore_ = hasMore_; result.id_ = id_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse) { return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse other) { if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.getDefaultInstance()) return this; if (resultsBuilder_ == null) { if (!other.results_.isEmpty()) { if (results_.isEmpty()) { results_ = other.results_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResultsIsMutable(); results_.addAll(other.results_); } onChanged(); } } else { if (!other.results_.isEmpty()) { if (resultsBuilder_.isEmpty()) { resultsBuilder_.dispose(); resultsBuilder_ = null; results_ = other.results_; bitField0_ = (bitField0_ & ~0x00000001); resultsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResultsFieldBuilder() : null; } else { resultsBuilder_.addAllMessages(other.results_); } } } if (other.getHasMore() != false) { setHasMore(other.getHasMore()); } if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List results_ = java.util.Collections.emptyList(); private void ensureResultsIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { results_ = new java.util.ArrayList(results_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder> resultsBuilder_; /** * repeated .protos.QueryResultBytes results = 1; */ public java.util.List getResultsList() { if (resultsBuilder_ == null) { return java.util.Collections.unmodifiableList(results_); } else { return resultsBuilder_.getMessageList(); } } /** * repeated .protos.QueryResultBytes results = 1; */ public int getResultsCount() { if (resultsBuilder_ == null) { return results_.size(); } else { return resultsBuilder_.getCount(); } } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getResults(int index) { if (resultsBuilder_ == null) { return results_.get(index); } else { return resultsBuilder_.getMessage(index); } } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder setResults( int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.set(index, value); onChanged(); } else { resultsBuilder_.setMessage(index, value); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder setResults( int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.set(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder addResults(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.add(value); onChanged(); } else { resultsBuilder_.addMessage(value); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder addResults( int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.add(index, value); onChanged(); } else { resultsBuilder_.addMessage(index, value); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder addResults( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder addResults( int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder addAllResults( java.lang.Iterable values) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, results_); onChanged(); } else { resultsBuilder_.addAllMessages(values); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder clearResults() { if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { resultsBuilder_.clear(); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public Builder removeResults(int index) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.remove(index); onChanged(); } else { resultsBuilder_.remove(index); } return this; } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder getResultsBuilder( int index) { return getResultsFieldBuilder().getBuilder(index); } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder getResultsOrBuilder( int index) { if (resultsBuilder_ == null) { return results_.get(index); } else { return resultsBuilder_.getMessageOrBuilder(index); } } /** * repeated .protos.QueryResultBytes results = 1; */ public java.util.List getResultsOrBuilderList() { if (resultsBuilder_ != null) { return resultsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(results_); } } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder addResultsBuilder() { return getResultsFieldBuilder().addBuilder( org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.getDefaultInstance()); } /** * repeated .protos.QueryResultBytes results = 1; */ public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder addResultsBuilder( int index) { return getResultsFieldBuilder().addBuilder( index, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.getDefaultInstance()); } /** * repeated .protos.QueryResultBytes results = 1; */ public java.util.List getResultsBuilderList() { return getResultsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder> getResultsFieldBuilder() { if (resultsBuilder_ == null) { resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder>( results_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; } private boolean hasMore_ ; /** * optional bool has_more = 2; */ public boolean getHasMore() { return hasMore_; } /** * optional bool has_more = 2; */ public Builder setHasMore(boolean value) { hasMore_ = value; onChanged(); return this; } /** * optional bool has_more = 2; */ public Builder clearHasMore() { hasMore_ = false; onChanged(); return this; } private java.lang.Object id_ = ""; /** * optional string id = 3; */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string id = 3; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string id = 3; */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** * optional string id = 3; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** * optional string id = 3; */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:protos.QueryResponse) } // @@protoc_insertion_point(class_scope:protos.QueryResponse) private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse(); } public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public QueryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QueryResponse(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_ChaincodeMessage_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_ChaincodeMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_GetState_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_GetState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_PutState_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_PutState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_DelState_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_DelState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_GetStateByRange_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_GetStateByRange_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_GetQueryResult_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_GetQueryResult_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_GetHistoryForKey_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_GetHistoryForKey_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_QueryStateNext_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_QueryStateNext_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_QueryStateClose_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_QueryStateClose_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_QueryResultBytes_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_QueryResultBytes_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_protos_QueryResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protos_QueryResponse_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\031peer/chaincode_shim.proto\022\006protos\032\032pee" + "r/chaincode_event.proto\032\023peer/proposal.p" + "roto\032\037google/protobuf/timestamp.proto\"\306\004" + "\n\020ChaincodeMessage\022+\n\004type\030\001 \001(\0162\035.proto" + "s.ChaincodeMessage.Type\022-\n\ttimestamp\030\002 \001" + "(\0132\032.google.protobuf.Timestamp\022\017\n\007payloa" + "d\030\003 \001(\014\022\014\n\004txid\030\004 \001(\t\022(\n\010proposal\030\005 \001(\0132" + "\026.protos.SignedProposal\022/\n\017chaincode_eve" + "nt\030\006 \001(\0132\026.protos.ChaincodeEvent\022\022\n\nchan" + "nel_id\030\007 \001(\t\"\307\002\n\004Type\022\r\n\tUNDEFINED\020\000\022\014\n\010", "REGISTER\020\001\022\016\n\nREGISTERED\020\002\022\010\n\004INIT\020\003\022\t\n\005" + "READY\020\004\022\017\n\013TRANSACTION\020\005\022\r\n\tCOMPLETED\020\006\022" + "\t\n\005ERROR\020\007\022\r\n\tGET_STATE\020\010\022\r\n\tPUT_STATE\020\t" + "\022\r\n\tDEL_STATE\020\n\022\024\n\020INVOKE_CHAINCODE\020\013\022\014\n" + "\010RESPONSE\020\r\022\026\n\022GET_STATE_BY_RANGE\020\016\022\024\n\020G" + "ET_QUERY_RESULT\020\017\022\024\n\020QUERY_STATE_NEXT\020\020\022" + "\025\n\021QUERY_STATE_CLOSE\020\021\022\r\n\tKEEPALIVE\020\022\022\027\n" + "\023GET_HISTORY_FOR_KEY\020\023\"+\n\010GetState\022\013\n\003ke" + "y\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\":\n\010PutState\022" + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014\022\022\n\ncollectio", "n\030\003 \001(\t\"+\n\010DelState\022\013\n\003key\030\001 \001(\t\022\022\n\ncoll" + "ection\030\002 \001(\t\"G\n\017GetStateByRange\022\020\n\010start" + "Key\030\001 \001(\t\022\016\n\006endKey\030\002 \001(\t\022\022\n\ncollection\030" + "\003 \001(\t\"3\n\016GetQueryResult\022\r\n\005query\030\001 \001(\t\022\022" + "\n\ncollection\030\002 \001(\t\"\037\n\020GetHistoryForKey\022\013" + "\n\003key\030\001 \001(\t\"\034\n\016QueryStateNext\022\n\n\002id\030\001 \001(" + "\t\"\035\n\017QueryStateClose\022\n\n\002id\030\001 \001(\t\"\'\n\020Quer" + "yResultBytes\022\023\n\013resultBytes\030\001 \001(\014\"X\n\rQue" + "ryResponse\022)\n\007results\030\001 \003(\0132\030.protos.Que" + "ryResultBytes\022\020\n\010has_more\030\002 \001(\010\022\n\n\002id\030\003 ", "\001(\t2X\n\020ChaincodeSupport\022D\n\010Register\022\030.pr" + "otos.ChaincodeMessage\032\030.protos.Chaincode" + "Message\"\000(\0010\001BO\n\"org.hyperledger.fabric." + "protos.peerZ)github.com/hyperledger/fabr" + "ic/protos/peerb\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[] { org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.getDescriptor(), org.hyperledger.fabric.protos.peer.ProposalPackage.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }, assigner); internal_static_protos_ChaincodeMessage_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_protos_ChaincodeMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_ChaincodeMessage_descriptor, new java.lang.String[] { "Type", "Timestamp", "Payload", "Txid", "Proposal", "ChaincodeEvent", "ChannelId", }); internal_static_protos_GetState_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_protos_GetState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_GetState_descriptor, new java.lang.String[] { "Key", "Collection", }); internal_static_protos_PutState_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_protos_PutState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_PutState_descriptor, new java.lang.String[] { "Key", "Value", "Collection", }); internal_static_protos_DelState_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_protos_DelState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_DelState_descriptor, new java.lang.String[] { "Key", "Collection", }); internal_static_protos_GetStateByRange_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_protos_GetStateByRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_GetStateByRange_descriptor, new java.lang.String[] { "StartKey", "EndKey", "Collection", }); internal_static_protos_GetQueryResult_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_protos_GetQueryResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_GetQueryResult_descriptor, new java.lang.String[] { "Query", "Collection", }); internal_static_protos_GetHistoryForKey_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_protos_GetHistoryForKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_GetHistoryForKey_descriptor, new java.lang.String[] { "Key", }); internal_static_protos_QueryStateNext_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_protos_QueryStateNext_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_QueryStateNext_descriptor, new java.lang.String[] { "Id", }); internal_static_protos_QueryStateClose_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_protos_QueryStateClose_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_QueryStateClose_descriptor, new java.lang.String[] { "Id", }); internal_static_protos_QueryResultBytes_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_protos_QueryResultBytes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_QueryResultBytes_descriptor, new java.lang.String[] { "ResultBytes", }); internal_static_protos_QueryResponse_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_protos_QueryResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_protos_QueryResponse_descriptor, new java.lang.String[] { "Results", "HasMore", "Id", }); org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.getDescriptor(); org.hyperledger.fabric.protos.peer.ProposalPackage.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy