org.hyperledger.fabric.protos.peer.ChaincodeShim Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-chaincode-protos Show documentation
Show all versions of fabric-chaincode-protos Show documentation
Hyperldger Fabric Java chaincode protobuf files
The newest version!
// 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 {
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
int getTypeValue();
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType();
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
boolean hasTimestamp();
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
com.google.protobuf.Timestamp getTimestamp();
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
/**
* bytes payload = 3;
*/
com.google.protobuf.ByteString getPayload();
/**
* string txid = 4;
*/
java.lang.String getTxid();
/**
* string txid = 4;
*/
com.google.protobuf.ByteString
getTxidBytes();
/**
* .protos.SignedProposal proposal = 5;
*/
boolean hasProposal();
/**
* .protos.SignedProposal proposal = 5;
*/
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal();
/**
* .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
*
*
* .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
*
*
* .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
*
*
* .protos.ChaincodeEvent chaincode_event = 6;
*/
org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder();
/**
*
*channel id
*
*
* string channel_id = 7;
*/
java.lang.String getChannelId();
/**
*
*channel id
*
*
* 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 {
private static final long serialVersionUID = 0L;
// Use ChaincodeMessage.newBuilder() to construct.
private ChaincodeMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeMessage() {
type_ = 0;
payload_ = com.google.protobuf.ByteString.EMPTY;
txid_ = "";
channelId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 26: {
payload_ = input.readBytes();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
txid_ = s;
break;
}
case 42: {
org.hyperledger.fabric.protos.peer.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;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
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),
/**
* GET_STATE_METADATA = 20;
*/
GET_STATE_METADATA(20),
/**
* PUT_STATE_METADATA = 21;
*/
PUT_STATE_METADATA(21),
/**
* GET_PRIVATE_DATA_HASH = 22;
*/
GET_PRIVATE_DATA_HASH(22),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* REGISTER = 1;
*/
public static final int REGISTER_VALUE = 1;
/**
* REGISTERED = 2;
*/
public static final int REGISTERED_VALUE = 2;
/**
* INIT = 3;
*/
public static final int INIT_VALUE = 3;
/**
* READY = 4;
*/
public static final int READY_VALUE = 4;
/**
* TRANSACTION = 5;
*/
public static final int TRANSACTION_VALUE = 5;
/**
* COMPLETED = 6;
*/
public static final int COMPLETED_VALUE = 6;
/**
* ERROR = 7;
*/
public static final int ERROR_VALUE = 7;
/**
* GET_STATE = 8;
*/
public static final int GET_STATE_VALUE = 8;
/**
* PUT_STATE = 9;
*/
public static final int PUT_STATE_VALUE = 9;
/**
* DEL_STATE = 10;
*/
public static final int DEL_STATE_VALUE = 10;
/**
* INVOKE_CHAINCODE = 11;
*/
public static final int INVOKE_CHAINCODE_VALUE = 11;
/**
* RESPONSE = 13;
*/
public static final int RESPONSE_VALUE = 13;
/**
* GET_STATE_BY_RANGE = 14;
*/
public static final int GET_STATE_BY_RANGE_VALUE = 14;
/**
* GET_QUERY_RESULT = 15;
*/
public static final int GET_QUERY_RESULT_VALUE = 15;
/**
* QUERY_STATE_NEXT = 16;
*/
public static final int QUERY_STATE_NEXT_VALUE = 16;
/**
* QUERY_STATE_CLOSE = 17;
*/
public static final int QUERY_STATE_CLOSE_VALUE = 17;
/**
* KEEPALIVE = 18;
*/
public static final int KEEPALIVE_VALUE = 18;
/**
* GET_HISTORY_FOR_KEY = 19;
*/
public static final int GET_HISTORY_FOR_KEY_VALUE = 19;
/**
* GET_STATE_METADATA = 20;
*/
public static final int GET_STATE_METADATA_VALUE = 20;
/**
* PUT_STATE_METADATA = 21;
*/
public static final int PUT_STATE_METADATA_VALUE = 21;
/**
* GET_PRIVATE_DATA_HASH = 22;
*/
public static final int GET_PRIVATE_DATA_HASH_VALUE = 22;
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;
case 20: return GET_STATE_METADATA;
case 21: return PUT_STATE_METADATA;
case 22: return GET_PRIVATE_DATA_HASH;
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_;
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
@SuppressWarnings("deprecation")
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_;
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
* .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_;
/**
* 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_;
/**
* 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;
}
}
/**
* 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_;
/**
* .protos.SignedProposal proposal = 5;
*/
public boolean hasProposal() {
return proposal_ != null;
}
/**
* .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_;
}
/**
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* 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
*
*
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != org.hyperledger.fabric.protos.peer.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_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != org.hyperledger.fabric.protos.peer.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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) obj;
if (type_ != other.type_) return false;
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (!getTimestamp()
.equals(other.getTimestamp())) return false;
}
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getTxid()
.equals(other.getTxid())) return false;
if (hasProposal() != other.hasProposal()) return false;
if (hasProposal()) {
if (!getProposal()
.equals(other.getProposal())) return false;
}
if (hasChaincodeEvent() != other.hasChaincodeEvent()) return false;
if (hasChaincodeEvent()) {
if (!getChaincodeEvent()
.equals(other.getChaincodeEvent())) return false;
}
if (!getChannelId()
.equals(other.getChannelId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + TXID_FIELD_NUMBER;
hash = (53 * hash) + getTxid().hashCode();
if (hasProposal()) {
hash = (37 * hash) + PROPOSAL_FIELD_NUMBER;
hash = (53 * hash) + getProposal().hashCode();
}
if (hasChaincodeEvent()) {
hash = (37 * hash) + CHAINCODE_EVENT_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeEvent().hashCode();
}
hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
hash = (53 * hash) + getChannelId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.ChaincodeMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeMessage)
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = 0;
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
payload_ = com.google.protobuf.ByteString.EMPTY;
txid_ = "";
if (proposalBuilder_ == null) {
proposal_ = null;
} else {
proposal_ = null;
proposalBuilder_ = null;
}
if (chaincodeEventBuilder_ == null) {
chaincodeEvent_ = null;
} else {
chaincodeEvent_ = null;
chaincodeEventBuilder_ = null;
}
channelId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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;
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
@SuppressWarnings("deprecation")
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;
}
/**
* .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;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp timestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public boolean hasTimestamp() {
return timestampBuilder_ != null || timestamp_ != null;
}
/**
* .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();
}
}
/**
* .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;
}
/**
* .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;
}
/**
* .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;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public Builder clearTimestamp() {
if (timestampBuilder_ == null) {
timestamp_ = null;
onChanged();
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
onChanged();
return getTimestampFieldBuilder().getBuilder();
}
/**
* .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_;
}
}
/**
* .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;
/**
* bytes payload = 3;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 3;
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
* bytes payload = 3;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private java.lang.Object txid_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string txid = 4;
*/
public Builder setTxid(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
txid_ = value;
onChanged();
return this;
}
/**
* string txid = 4;
*/
public Builder clearTxid() {
txid_ = getDefaultInstance().getTxid();
onChanged();
return this;
}
/**
* 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_;
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_;
/**
* .protos.SignedProposal proposal = 5;
*/
public boolean hasProposal() {
return proposalBuilder_ != null || proposal_ != null;
}
/**
* .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();
}
}
/**
* .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;
}
/**
* .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;
}
/**
* .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;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public Builder clearProposal() {
if (proposalBuilder_ == null) {
proposal_ = null;
onChanged();
} else {
proposal_ = null;
proposalBuilder_ = null;
}
return this;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder getProposalBuilder() {
onChanged();
return getProposalFieldBuilder().getBuilder();
}
/**
* .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_;
}
}
/**
* .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_;
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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* .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
*
*
* 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
*
*
* 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
*
*
* string channel_id = 7;
*/
public Builder setChannelId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
channelId_ = value;
onChanged();
return this;
}
/**
*
*channel id
*
*
* string channel_id = 7;
*/
public Builder clearChannelId() {
channelId_ = getDefaultInstance().getChannelId();
onChanged();
return this;
}
/**
*
*channel id
*
*
* 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;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeMessage)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeMessage)
private static final org.hyperledger.fabric.protos.peer.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() {
@java.lang.Override
public ChaincodeMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GetStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.GetState)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
*/
java.lang.String getCollection();
/**
* string collection = 2;
*/
com.google.protobuf.ByteString
getCollectionBytes();
}
/**
*
* GetState is the payload of a ChaincodeMessage. It contains a key which
* is to be fetched from the ledger. If the collection is specified, the key
* would be fetched from the collection (i.e., private state)
*
*
* Protobuf type {@code protos.GetState}
*/
public static final class GetState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.GetState)
GetStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetState.newBuilder() to construct.
private GetState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetState() {
key_ = "";
collection_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetState();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GetState is the payload of a ChaincodeMessage. It contains a key which
* is to be fetched from the ledger. If the collection is specified, the key
* would be fetched from the collection (i.e., private state)
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
collection_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 2;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GetStateMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.GetStateMetadata)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
*/
java.lang.String getCollection();
/**
* string collection = 2;
*/
com.google.protobuf.ByteString
getCollectionBytes();
}
/**
* Protobuf type {@code protos.GetStateMetadata}
*/
public static final class GetStateMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.GetStateMetadata)
GetStateMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetStateMetadata.newBuilder() to construct.
private GetStateMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetStateMetadata() {
key_ = "";
collection_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetStateMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetStateMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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.GetStateMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata 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.GetStateMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata 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.GetStateMetadata 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.GetStateMetadata 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.GetStateMetadata 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.GetStateMetadata 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.GetStateMetadata 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.GetStateMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.GetStateMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.GetStateMetadata)
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
collection_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateMetadata_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata(this);
result.key_ = key_;
result.collection_ = collection_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 2;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.GetStateMetadata)
}
// @@protoc_insertion_point(class_scope:protos.GetStateMetadata)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GetStateMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetStateMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PutStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.PutState)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* bytes value = 2;
*/
com.google.protobuf.ByteString getValue();
/**
* string collection = 3;
*/
java.lang.String getCollection();
/**
* string collection = 3;
*/
com.google.protobuf.ByteString
getCollectionBytes();
}
/**
*
* PutState is the payload of a ChaincodeMessage. It contains a key and value
* which needs to be written to the transaction's write set. If the collection is
* specified, the key and value would be written to the transaction's private
* write set.
*
*
* Protobuf type {@code protos.PutState}
*/
public static final class PutState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.PutState)
PutStateOrBuilder {
private static final long serialVersionUID = 0L;
// 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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PutState();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PutState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 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;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!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_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getValue()
.equals(other.getValue())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* PutState is the payload of a ChaincodeMessage. It contains a key and value
* which needs to be written to the transaction's write set. If the collection is
* specified, the key and value would be written to the transaction's private
* write set.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
collection_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutState_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* 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;
/**
* bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 2;
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* bytes value = 2;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 3;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PutStateMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.PutStateMetadata)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 3;
*/
java.lang.String getCollection();
/**
* string collection = 3;
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* .protos.StateMetadata metadata = 4;
*/
boolean hasMetadata();
/**
* .protos.StateMetadata metadata = 4;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getMetadata();
/**
* .protos.StateMetadata metadata = 4;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getMetadataOrBuilder();
}
/**
* Protobuf type {@code protos.PutStateMetadata}
*/
public static final class PutStateMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.PutStateMetadata)
PutStateMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use PutStateMetadata.newBuilder() to construct.
private PutStateMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PutStateMetadata() {
key_ = "";
collection_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PutStateMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PutStateMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
case 34: {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutStateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutStateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
* 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;
}
}
/**
* 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 = 3;
private volatile java.lang.Object collection_;
/**
* 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;
}
}
/**
* 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;
}
}
public static final int METADATA_FIELD_NUMBER = 4;
private org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata metadata_;
/**
* .protos.StateMetadata metadata = 4;
*/
public boolean hasMetadata() {
return metadata_ != null;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getMetadata() {
return metadata_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance() : metadata_;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_);
}
if (metadata_ != null) {
output.writeMessage(4, getMetadata());
}
unknownFields.writeTo(output);
}
@java.lang.Override
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(3, collection_);
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMetadata());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + COLLECTION_FIELD_NUMBER;
hash = (53 * hash) + getCollection().hashCode();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata 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.PutStateMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata 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.PutStateMetadata 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.PutStateMetadata 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.PutStateMetadata 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.PutStateMetadata 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.PutStateMetadata 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.PutStateMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.PutStateMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.PutStateMetadata)
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutStateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutStateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
collection_ = "";
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_PutStateMetadata_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata(this);
result.key_ = key_;
result.collection_ = collection_;
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
onChanged();
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 3;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder> metadataBuilder_;
/**
* .protos.StateMetadata metadata = 4;
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder setMetadata(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder setMetadata(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder mergeMetadata(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance() : metadata_;
}
}
/**
* .protos.StateMetadata metadata = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.PutStateMetadata)
}
// @@protoc_insertion_point(class_scope:protos.PutStateMetadata)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PutStateMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PutStateMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DelStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.DelState)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
*/
java.lang.String getCollection();
/**
* string collection = 2;
*/
com.google.protobuf.ByteString
getCollectionBytes();
}
/**
*
* DelState is the payload of a ChaincodeMessage. It contains a key which
* needs to be recorded in the transaction's write set as a delete operation.
* If the collection is specified, the key needs to be recorded in the
* transaction's private write set as a delete operation.
*
*
* Protobuf type {@code protos.DelState}
*/
public static final class DelState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.DelState)
DelStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use DelState.newBuilder() to construct.
private DelState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DelState() {
key_ = "";
collection_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DelState();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DelState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* DelState is the payload of a ChaincodeMessage. It contains a key which
* needs to be recorded in the transaction's write set as a delete operation.
* If the collection is specified, the key needs to be recorded in the
* transaction's private write set as a delete operation.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
collection_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_DelState_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 2;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 {
/**
* string startKey = 1;
*/
java.lang.String getStartKey();
/**
* string startKey = 1;
*/
com.google.protobuf.ByteString
getStartKeyBytes();
/**
* string endKey = 2;
*/
java.lang.String getEndKey();
/**
* string endKey = 2;
*/
com.google.protobuf.ByteString
getEndKeyBytes();
/**
* string collection = 3;
*/
java.lang.String getCollection();
/**
* string collection = 3;
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* bytes metadata = 4;
*/
com.google.protobuf.ByteString getMetadata();
}
/**
*
* GetStateByRange is the payload of a ChaincodeMessage. It contains a start key and
* a end key required to execute range query. If the collection is specified,
* the range query needs to be executed on the private data. The metadata hold
* the byte representation of QueryMetadata.
*
*
* Protobuf type {@code protos.GetStateByRange}
*/
public static final class GetStateByRange extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.GetStateByRange)
GetStateByRangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetStateByRange.newBuilder() to construct.
private GetStateByRange(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetStateByRange() {
startKey_ = "";
endKey_ = "";
collection_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetStateByRange();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetStateByRange(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 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;
}
case 34: {
metadata_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
}
}
public static final int METADATA_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString metadata_;
/**
* bytes metadata = 4;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!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_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(4, metadata_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, metadata_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange) obj;
if (!getStartKey()
.equals(other.getStartKey())) return false;
if (!getEndKey()
.equals(other.getEndKey())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!getMetadata()
.equals(other.getMetadata())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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 = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GetStateByRange is the payload of a ChaincodeMessage. It contains a start key and
* a end key required to execute range query. If the collection is specified,
* the range query needs to be executed on the private data. The metadata hold
* the byte representation of QueryMetadata.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
startKey_ = "";
endKey_ = "";
collection_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetStateByRange_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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_;
result.metadata_ = metadata_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string startKey = 1;
*/
public Builder setStartKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
startKey_ = value;
onChanged();
return this;
}
/**
* string startKey = 1;
*/
public Builder clearStartKey() {
startKey_ = getDefaultInstance().getStartKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string endKey = 2;
*/
public Builder setEndKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
endKey_ = value;
onChanged();
return this;
}
/**
* string endKey = 2;
*/
public Builder clearEndKey() {
endKey_ = getDefaultInstance().getEndKey();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 3;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 3;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 4;
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
return this;
}
/**
* bytes metadata = 4;
*/
public Builder clearMetadata() {
metadata_ = getDefaultInstance().getMetadata();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 {
/**
* string query = 1;
*/
java.lang.String getQuery();
/**
* string query = 1;
*/
com.google.protobuf.ByteString
getQueryBytes();
/**
* string collection = 2;
*/
java.lang.String getCollection();
/**
* string collection = 2;
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* bytes metadata = 3;
*/
com.google.protobuf.ByteString getMetadata();
}
/**
*
* GetQueryResult is the payload of a ChaincodeMessage. It contains a query
* string in the form that is supported by the underlying state database.
* If the collection is specified, the query needs to be executed on the
* private data. The metadata hold the byte representation of QueryMetadata.
*
*
* Protobuf type {@code protos.GetQueryResult}
*/
public static final class GetQueryResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.GetQueryResult)
GetQueryResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetQueryResult.newBuilder() to construct.
private GetQueryResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetQueryResult() {
query_ = "";
collection_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetQueryResult();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetQueryResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
query_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
case 26: {
metadata_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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_;
/**
* 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;
}
}
/**
* 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;
}
}
public static final int METADATA_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString metadata_;
/**
* bytes metadata = 3;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getQueryBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(3, metadata_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, metadata_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult) obj;
if (!getQuery()
.equals(other.getQuery())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!getMetadata()
.equals(other.getMetadata())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
hash = (37 * hash) + COLLECTION_FIELD_NUMBER;
hash = (53 * hash) + getCollection().hashCode();
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GetQueryResult is the payload of a ChaincodeMessage. It contains a query
* string in the form that is supported by the underlying state database.
* If the collection is specified, the query needs to be executed on the
* private data. The metadata hold the byte representation of QueryMetadata.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
query_ = "";
collection_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetQueryResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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_;
result.metadata_ = metadata_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string query = 1;
*/
public Builder setQuery(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
return this;
}
/**
* string query = 1;
*/
public Builder clearQuery() {
query_ = getDefaultInstance().getQuery();
onChanged();
return this;
}
/**
* 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string collection = 2;
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
* string collection = 2;
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 3;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 3;
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
return this;
}
/**
* bytes metadata = 3;
*/
public Builder clearMetadata() {
metadata_ = getDefaultInstance().getMetadata();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.QueryMetadata)
com.google.protobuf.MessageOrBuilder {
/**
* int32 pageSize = 1;
*/
int getPageSize();
/**
* string bookmark = 2;
*/
java.lang.String getBookmark();
/**
* string bookmark = 2;
*/
com.google.protobuf.ByteString
getBookmarkBytes();
}
/**
*
* QueryMetadata is the metadata of a GetStateByRange and GetQueryResult.
* It contains a pageSize which denotes the number of records to be fetched
* and a bookmark.
*
*
* Protobuf type {@code protos.QueryMetadata}
*/
public static final class QueryMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.QueryMetadata)
QueryMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryMetadata.newBuilder() to construct.
private QueryMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryMetadata() {
bookmark_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
pageSize_ = input.readInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
bookmark_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.Builder.class);
}
public static final int PAGESIZE_FIELD_NUMBER = 1;
private int pageSize_;
/**
* int32 pageSize = 1;
*/
public int getPageSize() {
return pageSize_;
}
public static final int BOOKMARK_FIELD_NUMBER = 2;
private volatile java.lang.Object bookmark_;
/**
* string bookmark = 2;
*/
public java.lang.String getBookmark() {
java.lang.Object ref = bookmark_;
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();
bookmark_ = s;
return s;
}
}
/**
* string bookmark = 2;
*/
public com.google.protobuf.ByteString
getBookmarkBytes() {
java.lang.Object ref = bookmark_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bookmark_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (pageSize_ != 0) {
output.writeInt32(1, pageSize_);
}
if (!getBookmarkBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bookmark_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (pageSize_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, pageSize_);
}
if (!getBookmarkBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bookmark_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata) obj;
if (getPageSize()
!= other.getPageSize()) return false;
if (!getBookmark()
.equals(other.getBookmark())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PAGESIZE_FIELD_NUMBER;
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + BOOKMARK_FIELD_NUMBER;
hash = (53 * hash) + getBookmark().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata 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.QueryMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata 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.QueryMetadata 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.QueryMetadata 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.QueryMetadata 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.QueryMetadata 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.QueryMetadata 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.QueryMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* QueryMetadata is the metadata of a GetStateByRange and GetQueryResult.
* It contains a pageSize which denotes the number of records to be fetched
* and a bookmark.
*
*
* Protobuf type {@code protos.QueryMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.QueryMetadata)
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
pageSize_ = 0;
bookmark_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryMetadata_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata(this);
result.pageSize_ = pageSize_;
result.bookmark_ = bookmark_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata.getDefaultInstance()) return this;
if (other.getPageSize() != 0) {
setPageSize(other.getPageSize());
}
if (!other.getBookmark().isEmpty()) {
bookmark_ = other.bookmark_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int pageSize_ ;
/**
* int32 pageSize = 1;
*/
public int getPageSize() {
return pageSize_;
}
/**
* int32 pageSize = 1;
*/
public Builder setPageSize(int value) {
pageSize_ = value;
onChanged();
return this;
}
/**
* int32 pageSize = 1;
*/
public Builder clearPageSize() {
pageSize_ = 0;
onChanged();
return this;
}
private java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
*/
public java.lang.String getBookmark() {
java.lang.Object ref = bookmark_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
bookmark_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string bookmark = 2;
*/
public com.google.protobuf.ByteString
getBookmarkBytes() {
java.lang.Object ref = bookmark_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bookmark_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string bookmark = 2;
*/
public Builder setBookmark(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bookmark_ = value;
onChanged();
return this;
}
/**
* string bookmark = 2;
*/
public Builder clearBookmark() {
bookmark_ = getDefaultInstance().getBookmark();
onChanged();
return this;
}
/**
* string bookmark = 2;
*/
public Builder setBookmarkBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bookmark_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.QueryMetadata)
}
// @@protoc_insertion_point(class_scope:protos.QueryMetadata)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GetHistoryForKeyOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.GetHistoryForKey)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
}
/**
*
* GetHistoryForKey is the payload of a ChaincodeMessage. It contains a key
* for which the historical values need to be retrieved.
*
*
* Protobuf type {@code protos.GetHistoryForKey}
*/
public static final class GetHistoryForKey extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.GetHistoryForKey)
GetHistoryForKeyOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetHistoryForKey.newBuilder() to construct.
private GetHistoryForKey(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetHistoryForKey() {
key_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetHistoryForKey();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetHistoryForKey(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GetHistoryForKey is the payload of a ChaincodeMessage. It contains a key
* for which the historical values need to be retrieved.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetHistoryForKey_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 {
/**
* string id = 1;
*/
java.lang.String getId();
/**
* 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 {
private static final long serialVersionUID = 0L;
// Use QueryStateNext.newBuilder() to construct.
private QueryStateNext(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryStateNext() {
id_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryStateNext();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryStateNext(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext) obj;
if (!getId()
.equals(other.getId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateNext_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string id = 1;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* string id = 1;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 1;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 {
/**
* string id = 1;
*/
java.lang.String getId();
/**
* 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 {
private static final long serialVersionUID = 0L;
// Use QueryStateClose.newBuilder() to construct.
private QueryStateClose(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryStateClose() {
id_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryStateClose();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryStateClose(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_descriptor;
}
@java.lang.Override
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_;
/**
* 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;
}
}
/**
* 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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose) obj;
if (!getId()
.equals(other.getId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryStateClose_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string id = 1;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* string id = 1;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 1;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 {
/**
* bytes resultBytes = 1;
*/
com.google.protobuf.ByteString getResultBytes();
}
/**
*
* QueryResultBytes hold the byte representation of a record returned by the peer.
*
*
* Protobuf type {@code protos.QueryResultBytes}
*/
public static final class QueryResultBytes extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.QueryResultBytes)
QueryResultBytesOrBuilder {
private static final long serialVersionUID = 0L;
// 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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryResultBytes();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryResultBytes(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
resultBytes_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_descriptor;
}
@java.lang.Override
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_;
/**
* bytes resultBytes = 1;
*/
public com.google.protobuf.ByteString getResultBytes() {
return resultBytes_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!resultBytes_.isEmpty()) {
output.writeBytes(1, resultBytes_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!resultBytes_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, resultBytes_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes) obj;
if (!getResultBytes()
.equals(other.getResultBytes())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* QueryResultBytes hold the byte representation of a record returned by the peer.
*
*
* 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;
}
@java.lang.Override
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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
resultBytes_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResultBytes_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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;
/**
* bytes resultBytes = 1;
*/
public com.google.protobuf.ByteString getResultBytes() {
return resultBytes_;
}
/**
* bytes resultBytes = 1;
*/
public Builder setResultBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
resultBytes_ = value;
onChanged();
return this;
}
/**
* bytes resultBytes = 1;
*/
public Builder clearResultBytes() {
resultBytes_ = getDefaultInstance().getResultBytes();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
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 extends org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder>
getResultsOrBuilderList();
/**
* repeated .protos.QueryResultBytes results = 1;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder getResultsOrBuilder(
int index);
/**
* bool has_more = 2;
*/
boolean getHasMore();
/**
* string id = 3;
*/
java.lang.String getId();
/**
* string id = 3;
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* bytes metadata = 4;
*/
com.google.protobuf.ByteString getMetadata();
}
/**
*
* QueryResponse is returned by the peer as a result of a GetStateByRange,
* GetQueryResult, and GetHistoryForKey. It holds a bunch of records in
* results field, a flag to denote whether more results need to be fetched from
* the peer in has_more field, transaction id in id field, and a QueryResponseMetadata
* in metadata field.
*
*
* Protobuf type {@code protos.QueryResponse}
*/
public static final class QueryResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.QueryResponse)
QueryResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryResponse.newBuilder() to construct.
private QueryResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryResponse() {
results_ = java.util.Collections.emptyList();
id_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
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;
}
case 34: {
metadata_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
results_ = java.util.Collections.unmodifiableList(results_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_descriptor;
}
@java.lang.Override
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);
}
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 extends org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder>
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_;
/**
* bool has_more = 2;
*/
public boolean getHasMore() {
return hasMore_;
}
public static final int ID_FIELD_NUMBER = 3;
private volatile java.lang.Object id_;
/**
* 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;
}
}
/**
* 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;
}
}
public static final int METADATA_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString metadata_;
/**
* bytes metadata = 4;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
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_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(4, metadata_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, metadata_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse) obj;
if (!getResultsList()
.equals(other.getResultsList())) return false;
if (getHasMore()
!= other.getHasMore()) return false;
if (!getId()
.equals(other.getId())) return false;
if (!getMetadata()
.equals(other.getMetadata())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
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 = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* QueryResponse is returned by the peer as a result of a GetStateByRange,
* GetQueryResult, and GetHistoryForKey. It holds a bunch of records in
* results field, a flag to denote whether more results need to be fetched from
* the peer in has_more field, transaction id in id field, and a QueryResponseMetadata
* in metadata field.
*
*
* 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;
}
@java.lang.Override
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();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (resultsBuilder_ == null) {
results_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
resultsBuilder_.clear();
}
hasMore_ = false;
id_ = "";
metadata_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponse_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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_;
if (resultsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
results_ = java.util.Collections.unmodifiableList(results_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.results_ = results_;
} else {
result.results_ = resultsBuilder_.build();
}
result.hasMore_ = hasMore_;
result.id_ = id_;
result.metadata_ = metadata_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.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();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.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) != 0)) {
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 extends org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes> 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 extends org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder>
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) != 0),
getParentForChildren(),
isClean());
results_ = null;
}
return resultsBuilder_;
}
private boolean hasMore_ ;
/**
* bool has_more = 2;
*/
public boolean getHasMore() {
return hasMore_;
}
/**
* bool has_more = 2;
*/
public Builder setHasMore(boolean value) {
hasMore_ = value;
onChanged();
return this;
}
/**
* bool has_more = 2;
*/
public Builder clearHasMore() {
hasMore_ = false;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string id = 3;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* string id = 3;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 3;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
*/
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 4;
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
return this;
}
/**
* bytes metadata = 4;
*/
public Builder clearMetadata() {
metadata_ = getDefaultInstance().getMetadata();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.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() {
@java.lang.Override
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;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryResponseMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.QueryResponseMetadata)
com.google.protobuf.MessageOrBuilder {
/**
* int32 fetched_records_count = 1;
*/
int getFetchedRecordsCount();
/**
* string bookmark = 2;
*/
java.lang.String getBookmark();
/**
* string bookmark = 2;
*/
com.google.protobuf.ByteString
getBookmarkBytes();
}
/**
*
* QueryResponseMetadata is the metadata of a QueryResponse. It contains a count
* which denotes the number of records fetched from the ledger and a bookmark.
*
*
* Protobuf type {@code protos.QueryResponseMetadata}
*/
public static final class QueryResponseMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.QueryResponseMetadata)
QueryResponseMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryResponseMetadata.newBuilder() to construct.
private QueryResponseMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryResponseMetadata() {
bookmark_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryResponseMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryResponseMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
fetchedRecordsCount_ = input.readInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
bookmark_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponseMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponseMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.Builder.class);
}
public static final int FETCHED_RECORDS_COUNT_FIELD_NUMBER = 1;
private int fetchedRecordsCount_;
/**
* int32 fetched_records_count = 1;
*/
public int getFetchedRecordsCount() {
return fetchedRecordsCount_;
}
public static final int BOOKMARK_FIELD_NUMBER = 2;
private volatile java.lang.Object bookmark_;
/**
* string bookmark = 2;
*/
public java.lang.String getBookmark() {
java.lang.Object ref = bookmark_;
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();
bookmark_ = s;
return s;
}
}
/**
* string bookmark = 2;
*/
public com.google.protobuf.ByteString
getBookmarkBytes() {
java.lang.Object ref = bookmark_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bookmark_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (fetchedRecordsCount_ != 0) {
output.writeInt32(1, fetchedRecordsCount_);
}
if (!getBookmarkBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bookmark_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fetchedRecordsCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, fetchedRecordsCount_);
}
if (!getBookmarkBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bookmark_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata) obj;
if (getFetchedRecordsCount()
!= other.getFetchedRecordsCount()) return false;
if (!getBookmark()
.equals(other.getBookmark())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FETCHED_RECORDS_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getFetchedRecordsCount();
hash = (37 * hash) + BOOKMARK_FIELD_NUMBER;
hash = (53 * hash) + getBookmark().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata 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.QueryResponseMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata 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.QueryResponseMetadata 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.QueryResponseMetadata 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.QueryResponseMetadata 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.QueryResponseMetadata 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.QueryResponseMetadata 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.QueryResponseMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* QueryResponseMetadata is the metadata of a QueryResponse. It contains a count
* which denotes the number of records fetched from the ledger and a bookmark.
*
*
* Protobuf type {@code protos.QueryResponseMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.QueryResponseMetadata)
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponseMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponseMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
fetchedRecordsCount_ = 0;
bookmark_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_QueryResponseMetadata_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata(this);
result.fetchedRecordsCount_ = fetchedRecordsCount_;
result.bookmark_ = bookmark_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata.getDefaultInstance()) return this;
if (other.getFetchedRecordsCount() != 0) {
setFetchedRecordsCount(other.getFetchedRecordsCount());
}
if (!other.getBookmark().isEmpty()) {
bookmark_ = other.bookmark_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int fetchedRecordsCount_ ;
/**
* int32 fetched_records_count = 1;
*/
public int getFetchedRecordsCount() {
return fetchedRecordsCount_;
}
/**
* int32 fetched_records_count = 1;
*/
public Builder setFetchedRecordsCount(int value) {
fetchedRecordsCount_ = value;
onChanged();
return this;
}
/**
* int32 fetched_records_count = 1;
*/
public Builder clearFetchedRecordsCount() {
fetchedRecordsCount_ = 0;
onChanged();
return this;
}
private java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
*/
public java.lang.String getBookmark() {
java.lang.Object ref = bookmark_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
bookmark_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string bookmark = 2;
*/
public com.google.protobuf.ByteString
getBookmarkBytes() {
java.lang.Object ref = bookmark_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bookmark_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string bookmark = 2;
*/
public Builder setBookmark(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bookmark_ = value;
onChanged();
return this;
}
/**
* string bookmark = 2;
*/
public Builder clearBookmark() {
bookmark_ = getDefaultInstance().getBookmark();
onChanged();
return this;
}
/**
* string bookmark = 2;
*/
public Builder setBookmarkBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bookmark_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.QueryResponseMetadata)
}
// @@protoc_insertion_point(class_scope:protos.QueryResponseMetadata)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryResponseMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryResponseMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StateMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.StateMetadata)
com.google.protobuf.MessageOrBuilder {
/**
* string metakey = 1;
*/
java.lang.String getMetakey();
/**
* string metakey = 1;
*/
com.google.protobuf.ByteString
getMetakeyBytes();
/**
* bytes value = 2;
*/
com.google.protobuf.ByteString getValue();
}
/**
* Protobuf type {@code protos.StateMetadata}
*/
public static final class StateMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.StateMetadata)
StateMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use StateMetadata.newBuilder() to construct.
private StateMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StateMetadata() {
metakey_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StateMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StateMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
metakey_ = s;
break;
}
case 18: {
value_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder.class);
}
public static final int METAKEY_FIELD_NUMBER = 1;
private volatile java.lang.Object metakey_;
/**
* string metakey = 1;
*/
public java.lang.String getMetakey() {
java.lang.Object ref = metakey_;
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();
metakey_ = s;
return s;
}
}
/**
* string metakey = 1;
*/
public com.google.protobuf.ByteString
getMetakeyBytes() {
java.lang.Object ref = metakey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
metakey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString value_;
/**
* bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getMetakeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metakey_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getMetakeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metakey_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, value_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata) obj;
if (!getMetakey()
.equals(other.getMetakey())) return false;
if (!getValue()
.equals(other.getValue())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + METAKEY_FIELD_NUMBER;
hash = (53 * hash) + getMetakey().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata 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.StateMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata 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.StateMetadata 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.StateMetadata 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.StateMetadata 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.StateMetadata 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.StateMetadata 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.StateMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.StateMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.StateMetadata)
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
metakey_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadata_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata(this);
result.metakey_ = metakey_;
result.value_ = value_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance()) return this;
if (!other.getMetakey().isEmpty()) {
metakey_ = other.metakey_;
onChanged();
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object metakey_ = "";
/**
* string metakey = 1;
*/
public java.lang.String getMetakey() {
java.lang.Object ref = metakey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
metakey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string metakey = 1;
*/
public com.google.protobuf.ByteString
getMetakeyBytes() {
java.lang.Object ref = metakey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
metakey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string metakey = 1;
*/
public Builder setMetakey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
metakey_ = value;
onChanged();
return this;
}
/**
* string metakey = 1;
*/
public Builder clearMetakey() {
metakey_ = getDefaultInstance().getMetakey();
onChanged();
return this;
}
/**
* string metakey = 1;
*/
public Builder setMetakeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
metakey_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 2;
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* bytes value = 2;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.StateMetadata)
}
// @@protoc_insertion_point(class_scope:protos.StateMetadata)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StateMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StateMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StateMetadataResultOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.StateMetadataResult)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .protos.StateMetadata entries = 1;
*/
java.util.List
getEntriesList();
/**
* repeated .protos.StateMetadata entries = 1;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getEntries(int index);
/**
* repeated .protos.StateMetadata entries = 1;
*/
int getEntriesCount();
/**
* repeated .protos.StateMetadata entries = 1;
*/
java.util.List extends org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getEntriesOrBuilderList();
/**
* repeated .protos.StateMetadata entries = 1;
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getEntriesOrBuilder(
int index);
}
/**
* Protobuf type {@code protos.StateMetadataResult}
*/
public static final class StateMetadataResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.StateMetadataResult)
StateMetadataResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use StateMetadataResult.newBuilder() to construct.
private StateMetadataResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StateMetadataResult() {
entries_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StateMetadataResult();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StateMetadataResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
entries_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
entries_.add(
input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadataResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadataResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.Builder.class);
}
public static final int ENTRIES_FIELD_NUMBER = 1;
private java.util.List entries_;
/**
* repeated .protos.StateMetadata entries = 1;
*/
public java.util.List getEntriesList() {
return entries_;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public java.util.List extends org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getEntriesOrBuilderList() {
return entries_;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public int getEntriesCount() {
return entries_.size();
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getEntries(int index) {
return entries_.get(index);
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getEntriesOrBuilder(
int index) {
return entries_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < entries_.size(); i++) {
output.writeMessage(1, entries_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < entries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, entries_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult) obj;
if (!getEntriesList()
.equals(other.getEntriesList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getEntriesCount() > 0) {
hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getEntriesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult 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.StateMetadataResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult 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.StateMetadataResult 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.StateMetadataResult 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.StateMetadataResult 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.StateMetadataResult 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.StateMetadataResult 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.StateMetadataResult parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.StateMetadataResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.StateMetadataResult)
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadataResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadataResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEntriesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
entriesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_StateMetadataResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult build() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult(this);
int from_bitField0_ = bitField0_;
if (entriesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.entries_ = entries_;
} else {
result.entries_ = entriesBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult.getDefaultInstance()) return this;
if (entriesBuilder_ == null) {
if (!other.entries_.isEmpty()) {
if (entries_.isEmpty()) {
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEntriesIsMutable();
entries_.addAll(other.entries_);
}
onChanged();
}
} else {
if (!other.entries_.isEmpty()) {
if (entriesBuilder_.isEmpty()) {
entriesBuilder_.dispose();
entriesBuilder_ = null;
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000001);
entriesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEntriesFieldBuilder() : null;
} else {
entriesBuilder_.addAllMessages(other.entries_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List entries_ =
java.util.Collections.emptyList();
private void ensureEntriesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
entries_ = new java.util.ArrayList(entries_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder> entriesBuilder_;
/**
* repeated .protos.StateMetadata entries = 1;
*/
public java.util.List getEntriesList() {
if (entriesBuilder_ == null) {
return java.util.Collections.unmodifiableList(entries_);
} else {
return entriesBuilder_.getMessageList();
}
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public int getEntriesCount() {
if (entriesBuilder_ == null) {
return entries_.size();
} else {
return entriesBuilder_.getCount();
}
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getEntries(int index) {
if (entriesBuilder_ == null) {
return entries_.get(index);
} else {
return entriesBuilder_.getMessage(index);
}
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder setEntries(
int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.set(index, value);
onChanged();
} else {
entriesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder setEntries(
int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.set(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder addEntries(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(value);
onChanged();
} else {
entriesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder addEntries(
int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(index, value);
onChanged();
} else {
entriesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder addEntries(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder addEntries(
int index, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder addAllEntries(
java.lang.Iterable extends org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata> values) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entries_);
onChanged();
} else {
entriesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder clearEntries() {
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
entriesBuilder_.clear();
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public Builder removeEntries(int index) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.remove(index);
onChanged();
} else {
entriesBuilder_.remove(index);
}
return this;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder getEntriesBuilder(
int index) {
return getEntriesFieldBuilder().getBuilder(index);
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getEntriesOrBuilder(
int index) {
if (entriesBuilder_ == null) {
return entries_.get(index); } else {
return entriesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public java.util.List extends org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getEntriesOrBuilderList() {
if (entriesBuilder_ != null) {
return entriesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entries_);
}
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder addEntriesBuilder() {
return getEntriesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance());
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder addEntriesBuilder(
int index) {
return getEntriesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance());
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
public java.util.List
getEntriesBuilderList() {
return getEntriesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getEntriesFieldBuilder() {
if (entriesBuilder_ == null) {
entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder, org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>(
entries_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
entries_ = null;
}
return entriesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.StateMetadataResult)
}
// @@protoc_insertion_point(class_scope:protos.StateMetadataResult)
private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StateMetadataResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StateMetadataResult(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult 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_GetStateMetadata_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_GetStateMetadata_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_PutStateMetadata_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_PutStateMetadata_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_QueryMetadata_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_QueryMetadata_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;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_QueryResponseMetadata_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_QueryResponseMetadata_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_StateMetadata_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_StateMetadata_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_StateMetadataResult_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_StateMetadataResult_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\"\221\005" +
"\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\"\222\003\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\022\026\n\022GET_STATE_META" +
"DATA\020\024\022\026\n\022PUT_STATE_METADATA\020\025\022\031\n\025GET_PR" +
"IVATE_DATA_HASH\020\026\"+\n\010GetState\022\013\n\003key\030\001 \001" +
"(\t\022\022\n\ncollection\030\002 \001(\t\"3\n\020GetStateMetada" +
"ta\022\013\n\003key\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\":\n\010P" +
"utState\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014\022\022\n\nc" +
"ollection\030\003 \001(\t\"\\\n\020PutStateMetadata\022\013\n\003k" +
"ey\030\001 \001(\t\022\022\n\ncollection\030\003 \001(\t\022\'\n\010metadata" +
"\030\004 \001(\0132\025.protos.StateMetadata\"+\n\010DelStat" +
"e\022\013\n\003key\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\"Y\n\017Ge" +
"tStateByRange\022\020\n\010startKey\030\001 \001(\t\022\016\n\006endKe" +
"y\030\002 \001(\t\022\022\n\ncollection\030\003 \001(\t\022\020\n\010metadata\030" +
"\004 \001(\014\"E\n\016GetQueryResult\022\r\n\005query\030\001 \001(\t\022\022" +
"\n\ncollection\030\002 \001(\t\022\020\n\010metadata\030\003 \001(\014\"3\n\r" +
"QueryMetadata\022\020\n\010pageSize\030\001 \001(\005\022\020\n\010bookm" +
"ark\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\017Quer" +
"yStateClose\022\n\n\002id\030\001 \001(\t\"\'\n\020QueryResultBy" +
"tes\022\023\n\013resultBytes\030\001 \001(\014\"j\n\rQueryRespons" +
"e\022)\n\007results\030\001 \003(\0132\030.protos.QueryResultB" +
"ytes\022\020\n\010has_more\030\002 \001(\010\022\n\n\002id\030\003 \001(\t\022\020\n\010me" +
"tadata\030\004 \001(\014\"H\n\025QueryResponseMetadata\022\035\n" +
"\025fetched_records_count\030\001 \001(\005\022\020\n\010bookmark" +
"\030\002 \001(\t\"/\n\rStateMetadata\022\017\n\007metakey\030\001 \001(\t" +
"\022\r\n\005value\030\002 \001(\014\"=\n\023StateMetadataResult\022&" +
"\n\007entries\030\001 \003(\0132\025.protos.StateMetadata2V" +
"\n\020ChaincodeSupport\022B\n\010Register\022\030.protos." +
"ChaincodeMessage\032\030.protos.ChaincodeMessa" +
"ge(\0010\0012N\n\tChaincode\022A\n\007Connect\022\030.protos." +
"ChaincodeMessage\032\030.protos.ChaincodeMessa" +
"ge(\0010\001BR\n\"org.hyperledger.fabric.protos." +
"peerZ,github.com/hyperledger/fabric-prot" +
"os-go/peerb\006proto3"
};
descriptor = 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(),
});
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_GetStateMetadata_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_GetStateMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_GetStateMetadata_descriptor,
new java.lang.String[] { "Key", "Collection", });
internal_static_protos_PutState_descriptor =
getDescriptor().getMessageTypes().get(3);
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_PutStateMetadata_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_protos_PutStateMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_PutStateMetadata_descriptor,
new java.lang.String[] { "Key", "Collection", "Metadata", });
internal_static_protos_DelState_descriptor =
getDescriptor().getMessageTypes().get(5);
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(6);
internal_static_protos_GetStateByRange_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_GetStateByRange_descriptor,
new java.lang.String[] { "StartKey", "EndKey", "Collection", "Metadata", });
internal_static_protos_GetQueryResult_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_protos_GetQueryResult_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_GetQueryResult_descriptor,
new java.lang.String[] { "Query", "Collection", "Metadata", });
internal_static_protos_QueryMetadata_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_protos_QueryMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_QueryMetadata_descriptor,
new java.lang.String[] { "PageSize", "Bookmark", });
internal_static_protos_GetHistoryForKey_descriptor =
getDescriptor().getMessageTypes().get(9);
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(10);
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(11);
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(12);
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(13);
internal_static_protos_QueryResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_QueryResponse_descriptor,
new java.lang.String[] { "Results", "HasMore", "Id", "Metadata", });
internal_static_protos_QueryResponseMetadata_descriptor =
getDescriptor().getMessageTypes().get(14);
internal_static_protos_QueryResponseMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_QueryResponseMetadata_descriptor,
new java.lang.String[] { "FetchedRecordsCount", "Bookmark", });
internal_static_protos_StateMetadata_descriptor =
getDescriptor().getMessageTypes().get(15);
internal_static_protos_StateMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_StateMetadata_descriptor,
new java.lang.String[] { "Metakey", "Value", });
internal_static_protos_StateMetadataResult_descriptor =
getDescriptor().getMessageTypes().get(16);
internal_static_protos_StateMetadataResult_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_StateMetadataResult_descriptor,
new java.lang.String[] { "Entries", });
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)
}