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-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.
// 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;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return The type.
*/
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType();
/**
* .google.protobuf.Timestamp timestamp = 2;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
* .google.protobuf.Timestamp timestamp = 2;
* @return The timestamp.
*/
com.google.protobuf.Timestamp getTimestamp();
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
/**
* bytes payload = 3;
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
/**
* string txid = 4;
* @return The txid.
*/
java.lang.String getTxid();
/**
* string txid = 4;
* @return The bytes for txid.
*/
com.google.protobuf.ByteString
getTxidBytes();
/**
* .protos.SignedProposal proposal = 5;
* @return Whether the proposal field is set.
*/
boolean hasProposal();
/**
* .protos.SignedProposal proposal = 5;
* @return The proposal.
*/
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;
* @return Whether the chaincodeEvent field is set.
*/
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;
* @return The chaincodeEvent.
*/
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;
* @return The channelId.
*/
java.lang.String getChannelId();
/**
*
*channel id
*
*
* string channel_id = 7;
* @return The bytes for channelId.
*/
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();
}
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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Type forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return REGISTER;
case 2: return REGISTERED;
case 3: return INIT;
case 4: return READY;
case 5: return TRANSACTION;
case 6: return COMPLETED;
case 7: return ERROR;
case 8: return GET_STATE;
case 9: return PUT_STATE;
case 10: return DEL_STATE;
case 11: return INVOKE_CHAINCODE;
case 13: return RESPONSE;
case 14: return GET_STATE_BY_RANGE;
case 15: return GET_QUERY_RESULT;
case 16: return QUERY_STATE_NEXT;
case 17: return QUERY_STATE_CLOSE;
case 18: return KEEPALIVE;
case 19: return GET_HISTORY_FOR_KEY;
case 20: return GET_STATE_METADATA;
case 21: return PUT_STATE_METADATA;
case 22: return GET_PRIVATE_DATA_HASH;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.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_ = 0;
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return The type.
*/
@java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.forNumber(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;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
public static final int PAYLOAD_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes payload = 3;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int TXID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object txid_ = "";
/**
* string txid = 4;
* @return The txid.
*/
@java.lang.Override
public java.lang.String getTxid() {
java.lang.Object ref = txid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
txid_ = s;
return s;
}
}
/**
* string txid = 4;
* @return The bytes for txid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTxidBytes() {
java.lang.Object ref = txid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROPOSAL_FIELD_NUMBER = 5;
private org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal proposal_;
/**
* .protos.SignedProposal proposal = 5;
* @return Whether the proposal field is set.
*/
@java.lang.Override
public boolean hasProposal() {
return proposal_ != null;
}
/**
* .protos.SignedProposal proposal = 5;
* @return The proposal.
*/
@java.lang.Override
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;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder() {
return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_;
}
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;
* @return Whether the chaincodeEvent field is set.
*/
@java.lang.Override
public boolean hasChaincodeEvent() {
return chaincodeEvent_ != null;
}
/**
*
*event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
*with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6;
* @return The chaincodeEvent.
*/
@java.lang.Override
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;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
}
public static final int CHANNEL_ID_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object channelId_ = "";
/**
*
*channel id
*
*
* string channel_id = 7;
* @return The channelId.
*/
@java.lang.Override
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelId_ = s;
return s;
}
}
/**
*
*channel id
*
*
* string channel_id = 7;
* @return The bytes for channelId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNDEFINED.getNumber()) {
output.writeEnum(1, type_);
}
if (timestamp_ != null) {
output.writeMessage(2, getTimestamp());
}
if (!payload_.isEmpty()) {
output.writeBytes(3, payload_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, txid_);
}
if (proposal_ != null) {
output.writeMessage(5, getProposal());
}
if (chaincodeEvent_ != null) {
output.writeMessage(6, getChaincodeEvent());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, channelId_);
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, txid_);
}
if (proposal_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getProposal());
}
if (chaincodeEvent_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getChaincodeEvent());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, channelId_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = 0;
timestamp_ = null;
if (timestampBuilder_ != null) {
timestampBuilder_.dispose();
timestampBuilder_ = null;
}
payload_ = com.google.protobuf.ByteString.EMPTY;
txid_ = "";
proposal_ = null;
if (proposalBuilder_ != null) {
proposalBuilder_.dispose();
proposalBuilder_ = null;
}
chaincodeEvent_ = null;
if (chaincodeEventBuilder_ != null) {
chaincodeEventBuilder_.dispose();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.timestamp_ = timestampBuilder_ == null
? timestamp_
: timestampBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.payload_ = payload_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.txid_ = txid_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.proposal_ = proposalBuilder_ == null
? proposal_
: proposalBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.chaincodeEvent_ = chaincodeEventBuilder_ == null
? chaincodeEvent_
: chaincodeEventBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.channelId_ = channelId_;
}
}
@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_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasProposal()) {
mergeProposal(other.getProposal());
}
if (other.hasChaincodeEvent()) {
mergeChaincodeEvent(other.getChaincodeEvent());
}
if (!other.getChannelId().isEmpty()) {
channelId_ = other.channelId_;
bitField0_ |= 0x00000040;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
type_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getTimestampFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
payload_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
txid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getProposalFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getChaincodeEventFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
channelId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int type_ = 0;
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return The type.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.forNumber(type_);
return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNRECOGNIZED : result;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .protos.ChaincodeMessage.Type type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
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;
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .google.protobuf.Timestamp timestamp = 2;
* @return The timestamp.
*/
public com.google.protobuf.Timestamp getTimestamp() {
if (timestampBuilder_ == null) {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
} else {
return timestampBuilder_.getMessage();
}
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public Builder setTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestamp_ = value;
} else {
timestampBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public Builder setTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampBuilder_ == null) {
timestamp_ = builderForValue.build();
} else {
timestampBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
timestamp_ != null &&
timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getTimestampBuilder().mergeFrom(value);
} else {
timestamp_ = value;
}
} else {
timestampBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = null;
if (timestampBuilder_ != null) {
timestampBuilder_.dispose();
timestampBuilder_ = null;
}
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2;
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
bitField0_ |= 0x00000002;
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;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 3;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
payload_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* bytes payload = 3;
* @return This builder for chaining.
*/
public Builder clearPayload() {
bitField0_ = (bitField0_ & ~0x00000004);
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private java.lang.Object txid_ = "";
/**
* string txid = 4;
* @return The txid.
*/
public java.lang.String getTxid() {
java.lang.Object ref = txid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
txid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string txid = 4;
* @return The bytes for txid.
*/
public com.google.protobuf.ByteString
getTxidBytes() {
java.lang.Object ref = txid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string txid = 4;
* @param value The txid to set.
* @return This builder for chaining.
*/
public Builder setTxid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
txid_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* string txid = 4;
* @return This builder for chaining.
*/
public Builder clearTxid() {
txid_ = getDefaultInstance().getTxid();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* string txid = 4;
* @param value The bytes for txid to set.
* @return This builder for chaining.
*/
public Builder setTxidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
txid_ = value;
bitField0_ |= 0x00000008;
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;
* @return Whether the proposal field is set.
*/
public boolean hasProposal() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* .protos.SignedProposal proposal = 5;
* @return The proposal.
*/
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;
} else {
proposalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public Builder setProposal(
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder builderForValue) {
if (proposalBuilder_ == null) {
proposal_ = builderForValue.build();
} else {
proposalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public Builder mergeProposal(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal value) {
if (proposalBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
proposal_ != null &&
proposal_ != org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance()) {
getProposalBuilder().mergeFrom(value);
} else {
proposal_ = value;
}
} else {
proposalBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public Builder clearProposal() {
bitField0_ = (bitField0_ & ~0x00000010);
proposal_ = null;
if (proposalBuilder_ != null) {
proposalBuilder_.dispose();
proposalBuilder_ = null;
}
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5;
*/
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder getProposalBuilder() {
bitField0_ |= 0x00000010;
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;
* @return Whether the chaincodeEvent field is set.
*/
public boolean hasChaincodeEvent() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*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;
* @return The chaincodeEvent.
*/
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;
} else {
chaincodeEventBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
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();
} else {
chaincodeEventBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
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 (((bitField0_ & 0x00000020) != 0) &&
chaincodeEvent_ != null &&
chaincodeEvent_ != org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance()) {
getChaincodeEventBuilder().mergeFrom(value);
} else {
chaincodeEvent_ = value;
}
} else {
chaincodeEventBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
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() {
bitField0_ = (bitField0_ & ~0x00000020);
chaincodeEvent_ = null;
if (chaincodeEventBuilder_ != null) {
chaincodeEventBuilder_.dispose();
chaincodeEventBuilder_ = null;
}
onChanged();
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() {
bitField0_ |= 0x00000020;
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;
* @return The channelId.
*/
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*channel id
*
*
* string channel_id = 7;
* @return The bytes for channelId.
*/
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*channel id
*
*
* string channel_id = 7;
* @param value The channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
channelId_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*channel id
*
*
* string channel_id = 7;
* @return This builder for chaining.
*/
public Builder clearChannelId() {
channelId_ = getDefaultInstance().getChannelId();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*channel id
*
*
* string channel_id = 7;
* @param value The bytes for channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
channelId_ = value;
bitField0_ |= 0x00000040;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 2;
* @return The bytes for collection.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.collection_ = collection_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string collection = 2;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string collection = 2;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000002;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 2;
* @return The bytes for collection.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.collection_ = collection_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string collection = 2;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string collection = 2;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000002;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* bytes value = 2;
* @return The value.
*/
com.google.protobuf.ByteString getValue();
/**
* string collection = 3;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 3;
* @return The bytes for collection.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
return value_;
}
public static final int COLLECTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, value_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collection_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutState result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.value_ = value_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.collection_ = collection_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
value_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
value_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* bytes value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* string collection = 3;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* string collection = 3;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000004;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 3;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 3;
* @return The bytes for collection.
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* .protos.StateMetadata metadata = 4;
* @return Whether the metadata field is set.
*/
boolean hasMetadata();
/**
* .protos.StateMetadata metadata = 4;
* @return The metadata.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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;
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return metadata_ != null;
}
/**
* .protos.StateMetadata metadata = 4;
* @return The metadata.
*/
@java.lang.Override
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;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder getMetadataOrBuilder() {
return metadata_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance() : 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_);
}
if (metadata_ != null) {
output.writeMessage(4, getMetadata());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collection_);
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMetadata());
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
key_ = "";
collection_ = "";
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.collection_ = collection_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.metadata_ = metadataBuilder_ == null
? metadata_
: metadataBuilder_.build();
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 26: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
input.readMessage(
getMetadataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string collection = 3;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string collection = 3;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000002;
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;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* .protos.StateMetadata metadata = 4;
* @return The metadata.
*/
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;
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder setMetadata(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder mergeMetadata(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
metadata_ != null &&
metadata_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.getDefaultInstance()) {
getMetadataBuilder().mergeFrom(value);
} else {
metadata_ = value;
}
} else {
metadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000004);
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
onChanged();
return this;
}
/**
* .protos.StateMetadata metadata = 4;
*/
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.Builder getMetadataBuilder() {
bitField0_ |= 0x00000004;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string collection = 2;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 2;
* @return The bytes for collection.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.DelState result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.collection_ = collection_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string collection = 2;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string collection = 2;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000002;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The startKey.
*/
java.lang.String getStartKey();
/**
* string startKey = 1;
* @return The bytes for startKey.
*/
com.google.protobuf.ByteString
getStartKeyBytes();
/**
* string endKey = 2;
* @return The endKey.
*/
java.lang.String getEndKey();
/**
* string endKey = 2;
* @return The bytes for endKey.
*/
com.google.protobuf.ByteString
getEndKeyBytes();
/**
* string collection = 3;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 3;
* @return The bytes for collection.
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* bytes metadata = 4;
* @return The metadata.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object startKey_ = "";
/**
* string startKey = 1;
* @return The startKey.
*/
@java.lang.Override
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;
* @return The bytes for startKey.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object endKey_ = "";
/**
* string endKey = 2;
* @return The endKey.
*/
@java.lang.Override
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;
* @return The bytes for endKey.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
* @return The metadata.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collection_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(4, metadata_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collection_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, metadata_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateByRange result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.startKey_ = startKey_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.endKey_ = endKey_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.collection_ = collection_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.metadata_ = metadata_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getEndKey().isEmpty()) {
endKey_ = other.endKey_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
startKey_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
endKey_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
metadata_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object startKey_ = "";
/**
* string startKey = 1;
* @return The startKey.
*/
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;
* @return The bytes for startKey.
*/
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;
* @param value The startKey to set.
* @return This builder for chaining.
*/
public Builder setStartKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
startKey_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string startKey = 1;
* @return This builder for chaining.
*/
public Builder clearStartKey() {
startKey_ = getDefaultInstance().getStartKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string startKey = 1;
* @param value The bytes for startKey to set.
* @return This builder for chaining.
*/
public Builder setStartKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
startKey_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object endKey_ = "";
/**
* string endKey = 2;
* @return The endKey.
*/
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;
* @return The bytes for endKey.
*/
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;
* @param value The endKey to set.
* @return This builder for chaining.
*/
public Builder setEndKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
endKey_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string endKey = 2;
* @return This builder for chaining.
*/
public Builder clearEndKey() {
endKey_ = getDefaultInstance().getEndKey();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string endKey = 2;
* @param value The bytes for endKey to set.
* @return This builder for chaining.
*/
public Builder setEndKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
endKey_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 3;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* string collection = 3;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* string collection = 3;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 4;
* @param value The metadata to set.
* @return This builder for chaining.
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
metadata_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* bytes metadata = 4;
* @return This builder for chaining.
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000008);
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The query.
*/
java.lang.String getQuery();
/**
* string query = 1;
* @return The bytes for query.
*/
com.google.protobuf.ByteString
getQueryBytes();
/**
* string collection = 2;
* @return The collection.
*/
java.lang.String getCollection();
/**
* string collection = 2;
* @return The bytes for collection.
*/
com.google.protobuf.ByteString
getCollectionBytes();
/**
* bytes metadata = 3;
* @return The metadata.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object query_ = "";
/**
* string query = 1;
* @return The query.
*/
@java.lang.Override
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;
* @return The bytes for query.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
@java.lang.Override
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;
* @return The bytes for collection.
*/
@java.lang.Override
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 3;
* @return The metadata.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(3, metadata_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, metadata_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetQueryResult result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.query_ = query_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.collection_ = collection_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.metadata_ = metadata_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
query_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
collection_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
metadata_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object query_ = "";
/**
* string query = 1;
* @return The query.
*/
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;
* @return The bytes for query.
*/
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;
* @param value The query to set.
* @return This builder for chaining.
*/
public Builder setQuery(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
query_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string query = 1;
* @return This builder for chaining.
*/
public Builder clearQuery() {
query_ = getDefaultInstance().getQuery();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string query = 1;
* @param value The bytes for query to set.
* @return This builder for chaining.
*/
public Builder setQueryBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
query_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object collection_ = "";
/**
* string collection = 2;
* @return The collection.
*/
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;
* @return The bytes for collection.
*/
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;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string collection = 2;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string collection = 2;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
collection_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 3;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 3;
* @param value The metadata to set.
* @return This builder for chaining.
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
metadata_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* bytes metadata = 3;
* @return This builder for chaining.
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000004);
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The pageSize.
*/
int getPageSize();
/**
* string bookmark = 2;
* @return The bookmark.
*/
java.lang.String getBookmark();
/**
* string bookmark = 2;
* @return The bytes for bookmark.
*/
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();
}
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_ = 0;
/**
* int32 pageSize = 1;
* @return The pageSize.
*/
@java.lang.Override
public int getPageSize() {
return pageSize_;
}
public static final int BOOKMARK_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
* @return The bookmark.
*/
@java.lang.Override
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;
* @return The bytes for bookmark.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bookmark_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bookmark_);
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bookmark_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bookmark_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.pageSize_ = pageSize_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.bookmark_ = bookmark_;
}
}
@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_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
pageSize_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
bookmark_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int pageSize_ ;
/**
* int32 pageSize = 1;
* @return The pageSize.
*/
@java.lang.Override
public int getPageSize() {
return pageSize_;
}
/**
* int32 pageSize = 1;
* @param value The pageSize to set.
* @return This builder for chaining.
*/
public Builder setPageSize(int value) {
pageSize_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 pageSize = 1;
* @return This builder for chaining.
*/
public Builder clearPageSize() {
bitField0_ = (bitField0_ & ~0x00000001);
pageSize_ = 0;
onChanged();
return this;
}
private java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
* @return The bookmark.
*/
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;
* @return The bytes for bookmark.
*/
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;
* @param value The bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmark(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
bookmark_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string bookmark = 2;
* @return This builder for chaining.
*/
public Builder clearBookmark() {
bookmark_ = getDefaultInstance().getBookmark();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string bookmark = 2;
* @param value The bytes for bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmarkBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
bookmark_ = value;
bitField0_ |= 0x00000002;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
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;
* @return The bytes for key.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetHistoryForKey result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
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;
* @return The bytes for key.
*/
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;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The id.
*/
java.lang.String getId();
/**
* string id = 1;
* @return The bytes for id.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
@java.lang.Override
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;
* @return The bytes for id.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateNext result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
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;
* @return The bytes for id.
*/
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;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The id.
*/
java.lang.String getId();
/**
* string id = 1;
* @return The bytes for id.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
@java.lang.Override
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;
* @return The bytes for id.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryStateClose result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
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;
* @return The bytes for id.
*/
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;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The resultBytes.
*/
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();
}
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes resultBytes = 1;
* @return The resultBytes.
*/
@java.lang.Override
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_);
}
getUnknownFields().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 += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resultBytes_ = resultBytes_;
}
}
@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.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
resultBytes_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString resultBytes_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes resultBytes = 1;
* @return The resultBytes.
*/
@java.lang.Override
public com.google.protobuf.ByteString getResultBytes() {
return resultBytes_;
}
/**
* bytes resultBytes = 1;
* @param value The resultBytes to set.
* @return This builder for chaining.
*/
public Builder setResultBytes(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
resultBytes_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* bytes resultBytes = 1;
* @return This builder for chaining.
*/
public Builder clearResultBytes() {
bitField0_ = (bitField0_ & ~0x00000001);
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The hasMore.
*/
boolean getHasMore();
/**
* string id = 3;
* @return The id.
*/
java.lang.String getId();
/**
* string id = 3;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* bytes metadata = 4;
* @return The metadata.
*/
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();
}
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;
@SuppressWarnings("serial")
private java.util.List results_;
/**
* repeated .protos.QueryResultBytes results = 1;
*/
@java.lang.Override
public java.util.List getResultsList() {
return results_;
}
/**
* repeated .protos.QueryResultBytes results = 1;
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytesOrBuilder>
getResultsOrBuilderList() {
return results_;
}
/**
* repeated .protos.QueryResultBytes results = 1;
*/
@java.lang.Override
public int getResultsCount() {
return results_.size();
}
/**
* repeated .protos.QueryResultBytes results = 1;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes getResults(int index) {
return results_.get(index);
}
/**
* repeated .protos.QueryResultBytes results = 1;
*/
@java.lang.Override
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_ = false;
/**
* bool has_more = 2;
* @return The hasMore.
*/
@java.lang.Override
public boolean getHasMore() {
return hasMore_;
}
public static final int ID_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* string id = 3;
* @return The id.
*/
@java.lang.Override
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;
* @return The bytes for id.
*/
@java.lang.Override
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
* @return The metadata.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(4, metadata_);
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, metadata_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (resultsBuilder_ == null) {
results_ = java.util.Collections.emptyList();
} else {
results_ = null;
resultsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse result) {
if (resultsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
results_ = java.util.Collections.unmodifiableList(results_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.results_ = results_;
} else {
result.results_ = resultsBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.hasMore_ = hasMore_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.metadata_ = metadata_;
}
}
@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_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes m =
input.readMessage(
org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResultBytes.parser(),
extensionRegistry);
if (resultsBuilder_ == null) {
ensureResultsIsMutable();
results_.add(m);
} else {
resultsBuilder_.addMessage(m);
}
break;
} // case 10
case 16: {
hasMore_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
metadata_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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;
* @return The hasMore.
*/
@java.lang.Override
public boolean getHasMore() {
return hasMore_;
}
/**
* bool has_more = 2;
* @param value The hasMore to set.
* @return This builder for chaining.
*/
public Builder setHasMore(boolean value) {
hasMore_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* bool has_more = 2;
* @return This builder for chaining.
*/
public Builder clearHasMore() {
bitField0_ = (bitField0_ & ~0x00000002);
hasMore_ = false;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
* string id = 3;
* @return The id.
*/
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;
* @return The bytes for id.
*/
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;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* string id = 3;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* string id = 3;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 4;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 4;
* @param value The metadata to set.
* @return This builder for chaining.
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
metadata_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* bytes metadata = 4;
* @return This builder for chaining.
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000008);
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The fetchedRecordsCount.
*/
int getFetchedRecordsCount();
/**
* string bookmark = 2;
* @return The bookmark.
*/
java.lang.String getBookmark();
/**
* string bookmark = 2;
* @return The bytes for bookmark.
*/
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();
}
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_ = 0;
/**
* int32 fetched_records_count = 1;
* @return The fetchedRecordsCount.
*/
@java.lang.Override
public int getFetchedRecordsCount() {
return fetchedRecordsCount_;
}
public static final int BOOKMARK_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
* @return The bookmark.
*/
@java.lang.Override
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;
* @return The bytes for bookmark.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bookmark_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bookmark_);
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bookmark_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bookmark_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.QueryResponseMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fetchedRecordsCount_ = fetchedRecordsCount_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.bookmark_ = bookmark_;
}
}
@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_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
fetchedRecordsCount_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
bookmark_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int fetchedRecordsCount_ ;
/**
* int32 fetched_records_count = 1;
* @return The fetchedRecordsCount.
*/
@java.lang.Override
public int getFetchedRecordsCount() {
return fetchedRecordsCount_;
}
/**
* int32 fetched_records_count = 1;
* @param value The fetchedRecordsCount to set.
* @return This builder for chaining.
*/
public Builder setFetchedRecordsCount(int value) {
fetchedRecordsCount_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 fetched_records_count = 1;
* @return This builder for chaining.
*/
public Builder clearFetchedRecordsCount() {
bitField0_ = (bitField0_ & ~0x00000001);
fetchedRecordsCount_ = 0;
onChanged();
return this;
}
private java.lang.Object bookmark_ = "";
/**
* string bookmark = 2;
* @return The bookmark.
*/
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;
* @return The bytes for bookmark.
*/
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;
* @param value The bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmark(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
bookmark_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string bookmark = 2;
* @return This builder for chaining.
*/
public Builder clearBookmark() {
bookmark_ = getDefaultInstance().getBookmark();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string bookmark = 2;
* @param value The bytes for bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmarkBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
bookmark_ = value;
bitField0_ |= 0x00000002;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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;
* @return The metakey.
*/
java.lang.String getMetakey();
/**
* string metakey = 1;
* @return The bytes for metakey.
*/
com.google.protobuf.ByteString
getMetakeyBytes();
/**
* bytes value = 2;
* @return The value.
*/
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();
}
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;
@SuppressWarnings("serial")
private volatile java.lang.Object metakey_ = "";
/**
* string metakey = 1;
* @return The metakey.
*/
@java.lang.Override
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;
* @return The bytes for metakey.
*/
@java.lang.Override
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_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metakey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metakey_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metakey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metakey_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, value_);
}
size += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.metakey_ = metakey_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.value_ = 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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
metakey_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
value_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object metakey_ = "";
/**
* string metakey = 1;
* @return The metakey.
*/
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;
* @return The bytes for metakey.
*/
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;
* @param value The metakey to set.
* @return This builder for chaining.
*/
public Builder setMetakey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
metakey_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string metakey = 1;
* @return This builder for chaining.
*/
public Builder clearMetakey() {
metakey_ = getDefaultInstance().getMetakey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string metakey = 1;
* @param value The bytes for metakey to set.
* @return This builder for chaining.
*/
public Builder setMetakeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
metakey_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 2;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
value_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* bytes value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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();
}
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;
@SuppressWarnings("serial")
private java.util.List entries_;
/**
* repeated .protos.StateMetadata entries = 1;
*/
@java.lang.Override
public java.util.List getEntriesList() {
return entries_;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataOrBuilder>
getEntriesOrBuilderList() {
return entries_;
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
@java.lang.Override
public int getEntriesCount() {
return entries_.size();
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata getEntries(int index) {
return entries_.get(index);
}
/**
* repeated .protos.StateMetadata entries = 1;
*/
@java.lang.Override
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));
}
getUnknownFields().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 += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
} else {
entries_ = null;
entriesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult result) {
if (entriesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.entries_ = entries_;
} else {
result.entries_ = entriesBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadataResult result) {
int from_bitField0_ = bitField0_;
}
@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.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata m =
input.readMessage(
org.hyperledger.fabric.protos.peer.ChaincodeShim.StateMetadata.parser(),
extensionRegistry);
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(m);
} else {
entriesBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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)
}