org.hyperledger.fabric.protos.peer.ChaincodeMessage Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: peer/chaincode_shim.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.peer;
/**
* Protobuf type {@code protos.ChaincodeMessage}
*/
public final class ChaincodeMessage extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeMessage)
ChaincodeMessageOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ChaincodeMessage.class.getName());
}
// Use ChaincodeMessage.newBuilder() to construct.
private ChaincodeMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ChaincodeMessage() {
type_ = 0;
payload_ = com.google.protobuf.ByteString.EMPTY;
txid_ = "";
channelId_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeMessage.Builder.class);
}
/**
* Protobuf enum {@code protos.ChaincodeMessage.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNDEFINED = 0;
*/
UNDEFINED(0),
/**
* REGISTER = 1;
*/
REGISTER(1),
/**
* REGISTERED = 2;
*/
REGISTERED(2),
/**
* INIT = 3;
*/
INIT(3),
/**
* READY = 4;
*/
READY(4),
/**
* TRANSACTION = 5;
*/
TRANSACTION(5),
/**
* COMPLETED = 6;
*/
COMPLETED(6),
/**
* ERROR = 7;
*/
ERROR(7),
/**
* GET_STATE = 8;
*/
GET_STATE(8),
/**
* PUT_STATE = 9;
*/
PUT_STATE(9),
/**
* DEL_STATE = 10;
*/
DEL_STATE(10),
/**
* INVOKE_CHAINCODE = 11;
*/
INVOKE_CHAINCODE(11),
/**
* RESPONSE = 13;
*/
RESPONSE(13),
/**
* GET_STATE_BY_RANGE = 14;
*/
GET_STATE_BY_RANGE(14),
/**
* GET_QUERY_RESULT = 15;
*/
GET_QUERY_RESULT(15),
/**
* QUERY_STATE_NEXT = 16;
*/
QUERY_STATE_NEXT(16),
/**
* QUERY_STATE_CLOSE = 17;
*/
QUERY_STATE_CLOSE(17),
/**
* KEEPALIVE = 18;
*/
KEEPALIVE(18),
/**
* GET_HISTORY_FOR_KEY = 19;
*/
GET_HISTORY_FOR_KEY(19),
/**
* GET_STATE_METADATA = 20;
*/
GET_STATE_METADATA(20),
/**
* PUT_STATE_METADATA = 21;
*/
PUT_STATE_METADATA(21),
/**
* GET_PRIVATE_DATA_HASH = 22;
*/
GET_PRIVATE_DATA_HASH(22),
/**
* PURGE_PRIVATE_DATA = 23;
*/
PURGE_PRIVATE_DATA(23),
UNRECOGNIZED(-1),
;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Type.class.getName());
}
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* REGISTER = 1;
*/
public static final int REGISTER_VALUE = 1;
/**
* REGISTERED = 2;
*/
public static final int REGISTERED_VALUE = 2;
/**
* INIT = 3;
*/
public static final int INIT_VALUE = 3;
/**
* READY = 4;
*/
public static final int READY_VALUE = 4;
/**
* TRANSACTION = 5;
*/
public static final int TRANSACTION_VALUE = 5;
/**
* COMPLETED = 6;
*/
public static final int COMPLETED_VALUE = 6;
/**
* ERROR = 7;
*/
public static final int ERROR_VALUE = 7;
/**
* GET_STATE = 8;
*/
public static final int GET_STATE_VALUE = 8;
/**
* PUT_STATE = 9;
*/
public static final int PUT_STATE_VALUE = 9;
/**
* DEL_STATE = 10;
*/
public static final int DEL_STATE_VALUE = 10;
/**
* INVOKE_CHAINCODE = 11;
*/
public static final int INVOKE_CHAINCODE_VALUE = 11;
/**
* RESPONSE = 13;
*/
public static final int RESPONSE_VALUE = 13;
/**
* GET_STATE_BY_RANGE = 14;
*/
public static final int GET_STATE_BY_RANGE_VALUE = 14;
/**
* GET_QUERY_RESULT = 15;
*/
public static final int GET_QUERY_RESULT_VALUE = 15;
/**
* QUERY_STATE_NEXT = 16;
*/
public static final int QUERY_STATE_NEXT_VALUE = 16;
/**
* QUERY_STATE_CLOSE = 17;
*/
public static final int QUERY_STATE_CLOSE_VALUE = 17;
/**
* KEEPALIVE = 18;
*/
public static final int KEEPALIVE_VALUE = 18;
/**
* GET_HISTORY_FOR_KEY = 19;
*/
public static final int GET_HISTORY_FOR_KEY_VALUE = 19;
/**
* GET_STATE_METADATA = 20;
*/
public static final int GET_STATE_METADATA_VALUE = 20;
/**
* PUT_STATE_METADATA = 21;
*/
public static final int PUT_STATE_METADATA_VALUE = 21;
/**
* GET_PRIVATE_DATA_HASH = 22;
*/
public static final int GET_PRIVATE_DATA_HASH_VALUE = 22;
/**
* PURGE_PRIVATE_DATA = 23;
*/
public static final int PURGE_PRIVATE_DATA_VALUE = 23;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Type forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return REGISTER;
case 2: return REGISTERED;
case 3: return INIT;
case 4: return READY;
case 5: return TRANSACTION;
case 6: return COMPLETED;
case 7: return ERROR;
case 8: return GET_STATE;
case 9: return PUT_STATE;
case 10: return DEL_STATE;
case 11: return INVOKE_CHAINCODE;
case 13: return RESPONSE;
case 14: return GET_STATE_BY_RANGE;
case 15: return GET_QUERY_RESULT;
case 16: return QUERY_STATE_NEXT;
case 17: return QUERY_STATE_CLOSE;
case 18: return KEEPALIVE;
case 19: return GET_HISTORY_FOR_KEY;
case 20: return GET_STATE_METADATA;
case 21: return PUT_STATE_METADATA;
case 22: return GET_PRIVATE_DATA_HASH;
case 23: return PURGE_PRIVATE_DATA;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.ChaincodeMessage.Type)
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @return The type.
*/
@java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.forNumber(type_);
return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNRECOGNIZED : result;
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp timestamp_;
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return The timestamp.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return 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 [json_name = "payload"];
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int TXID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object txid_ = "";
/**
* string txid = 4 [json_name = "txid"];
* @return The txid.
*/
@java.lang.Override
public java.lang.String getTxid() {
java.lang.Object ref = txid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
txid_ = s;
return s;
}
}
/**
* string txid = 4 [json_name = "txid"];
* @return The bytes for txid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTxidBytes() {
java.lang.Object ref = txid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROPOSAL_FIELD_NUMBER = 5;
private org.hyperledger.fabric.protos.peer.SignedProposal proposal_;
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
* @return Whether the proposal field is set.
*/
@java.lang.Override
public boolean hasProposal() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
* @return The proposal.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.SignedProposal getProposal() {
return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_;
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposalOrBuilder() {
return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_;
}
public static final int CHAINCODE_EVENT_FIELD_NUMBER = 6;
private org.hyperledger.fabric.protos.peer.ChaincodeEvent chaincodeEvent_;
/**
*
* event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
* with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"];
* @return Whether the chaincodeEvent field is set.
*/
@java.lang.Override
public boolean hasChaincodeEvent() {
return ((bitField0_ & 0x00000004) != 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 [json_name = "chaincodeEvent"];
* @return The chaincodeEvent.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEvent getChaincodeEvent() {
return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
}
/**
*
* event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
* with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.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 [json_name = "channelId"];
* @return The channelId.
*/
@java.lang.Override
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelId_ = s;
return s;
}
}
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @return The bytes for channelId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNDEFINED.getNumber()) {
output.writeEnum(1, type_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getTimestamp());
}
if (!payload_.isEmpty()) {
output.writeBytes(3, payload_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(txid_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 4, txid_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getProposal());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getChaincodeEvent());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
com.google.protobuf.GeneratedMessage.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.ChaincodeMessage.Type.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTimestamp());
}
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, payload_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(txid_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(4, txid_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getProposal());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getChaincodeEvent());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
size += com.google.protobuf.GeneratedMessage.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.ChaincodeMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeMessage other = (org.hyperledger.fabric.protos.peer.ChaincodeMessage) obj;
if (type_ != other.type_) return false;
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (!getTimestamp()
.equals(other.getTimestamp())) return false;
}
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getTxid()
.equals(other.getTxid())) return false;
if (hasProposal() != other.hasProposal()) return false;
if (hasProposal()) {
if (!getProposal()
.equals(other.getProposal())) return false;
}
if (hasChaincodeEvent() != other.hasChaincodeEvent()) return false;
if (hasChaincodeEvent()) {
if (!getChaincodeEvent()
.equals(other.getChaincodeEvent())) return false;
}
if (!getChannelId()
.equals(other.getChannelId())) return false;
if (!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.ChaincodeMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.ChaincodeMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeMessage)
org.hyperledger.fabric.protos.peer.ChaincodeMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeMessage.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getTimestampFieldBuilder();
getProposalFieldBuilder();
getChaincodeEventFieldBuilder();
}
}
@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.ChaincodeShimProto.internal_static_protos_ChaincodeMessage_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeMessage getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeMessage build() {
org.hyperledger.fabric.protos.peer.ChaincodeMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeMessage buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeMessage result = new org.hyperledger.fabric.protos.peer.ChaincodeMessage(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeMessage result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.timestamp_ = timestampBuilder_ == null
? timestamp_
: timestampBuilder_.build();
to_bitField0_ |= 0x00000001;
}
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();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.chaincodeEvent_ = chaincodeEventBuilder_ == null
? chaincodeEvent_
: chaincodeEventBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.channelId_ = channelId_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeMessage) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeMessage other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
if (!other.getTxid().isEmpty()) {
txid_ = other.txid_;
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 [json_name = "type"];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @return The type.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.forNumber(type_);
return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type.UNRECOGNIZED : result;
}
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeMessage.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .protos.ChaincodeMessage.Type type = 1 [json_name = "type"];
* @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.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return The timestamp.
*/
public com.google.protobuf.Timestamp getTimestamp() {
if (timestampBuilder_ == null) {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
} else {
return timestampBuilder_.getMessage();
}
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder setTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestamp_ = value;
} else {
timestampBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder setTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampBuilder_ == null) {
timestamp_ = builderForValue.build();
} else {
timestampBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
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);
}
if (timestamp_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = null;
if (timestampBuilder_ != null) {
timestampBuilder_.dispose();
timestampBuilder_ = null;
}
onChanged();
return this;
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getTimestampFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
if (timestampBuilder_ != null) {
return timestampBuilder_.getMessageOrBuilder();
} else {
return timestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
}
/**
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimestampFieldBuilder() {
if (timestampBuilder_ == null) {
timestampBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTimestamp(),
getParentForChildren(),
isClean());
timestamp_ = null;
}
return timestampBuilder_;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes payload = 3 [json_name = "payload"];
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 3 [json_name = "payload"];
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
payload_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* bytes payload = 3 [json_name = "payload"];
* @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 [json_name = "txid"];
* @return The txid.
*/
public java.lang.String getTxid() {
java.lang.Object ref = txid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
txid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string txid = 4 [json_name = "txid"];
* @return The bytes for txid.
*/
public com.google.protobuf.ByteString
getTxidBytes() {
java.lang.Object ref = txid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string txid = 4 [json_name = "txid"];
* @param value The txid to set.
* @return This builder for chaining.
*/
public Builder setTxid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
txid_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* string txid = 4 [json_name = "txid"];
* @return This builder for chaining.
*/
public Builder clearTxid() {
txid_ = getDefaultInstance().getTxid();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* string txid = 4 [json_name = "txid"];
* @param value The bytes for txid to set.
* @return This builder for chaining.
*/
public Builder setTxidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
txid_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.SignedProposal proposal_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder> proposalBuilder_;
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
* @return Whether the proposal field is set.
*/
public boolean hasProposal() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
* @return The proposal.
*/
public org.hyperledger.fabric.protos.peer.SignedProposal getProposal() {
if (proposalBuilder_ == null) {
return proposal_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_;
} else {
return proposalBuilder_.getMessage();
}
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public Builder setProposal(org.hyperledger.fabric.protos.peer.SignedProposal value) {
if (proposalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
proposal_ = value;
} else {
proposalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public Builder setProposal(
org.hyperledger.fabric.protos.peer.SignedProposal.Builder builderForValue) {
if (proposalBuilder_ == null) {
proposal_ = builderForValue.build();
} else {
proposalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public Builder mergeProposal(org.hyperledger.fabric.protos.peer.SignedProposal value) {
if (proposalBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
proposal_ != null &&
proposal_ != org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance()) {
getProposalBuilder().mergeFrom(value);
} else {
proposal_ = value;
}
} else {
proposalBuilder_.mergeFrom(value);
}
if (proposal_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public Builder clearProposal() {
bitField0_ = (bitField0_ & ~0x00000010);
proposal_ = null;
if (proposalBuilder_ != null) {
proposalBuilder_.dispose();
proposalBuilder_ = null;
}
onChanged();
return this;
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public org.hyperledger.fabric.protos.peer.SignedProposal.Builder getProposalBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getProposalFieldBuilder().getBuilder();
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposalOrBuilder() {
if (proposalBuilder_ != null) {
return proposalBuilder_.getMessageOrBuilder();
} else {
return proposal_ == null ?
org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposal_;
}
}
/**
* .protos.SignedProposal proposal = 5 [json_name = "proposal"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder>
getProposalFieldBuilder() {
if (proposalBuilder_ == null) {
proposalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder>(
getProposal(),
getParentForChildren(),
isClean());
proposal_ = null;
}
return proposalBuilder_;
}
private org.hyperledger.fabric.protos.peer.ChaincodeEvent chaincodeEvent_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder> chaincodeEventBuilder_;
/**
*
* event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
* with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"];
* @return Whether the chaincodeEvent field is set.
*/
public boolean hasChaincodeEvent() {
return ((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 [json_name = "chaincodeEvent"];
* @return The chaincodeEvent.
*/
public org.hyperledger.fabric.protos.peer.ChaincodeEvent getChaincodeEvent() {
if (chaincodeEventBuilder_ == null) {
return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
} else {
return chaincodeEventBuilder_.getMessage();
}
}
/**
*
* event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
* with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"];
*/
public Builder setChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEvent value) {
if (chaincodeEventBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeEvent_ = value;
} 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 [json_name = "chaincodeEvent"];
*/
public Builder setChaincodeEvent(
org.hyperledger.fabric.protos.peer.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 [json_name = "chaincodeEvent"];
*/
public Builder mergeChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEvent value) {
if (chaincodeEventBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
chaincodeEvent_ != null &&
chaincodeEvent_ != org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance()) {
getChaincodeEventBuilder().mergeFrom(value);
} else {
chaincodeEvent_ = value;
}
} else {
chaincodeEventBuilder_.mergeFrom(value);
}
if (chaincodeEvent_ != null) {
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 [json_name = "chaincodeEvent"];
*/
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 [json_name = "chaincodeEvent"];
*/
public org.hyperledger.fabric.protos.peer.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 [json_name = "chaincodeEvent"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
if (chaincodeEventBuilder_ != null) {
return chaincodeEventBuilder_.getMessageOrBuilder();
} else {
return chaincodeEvent_ == null ?
org.hyperledger.fabric.protos.peer.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
}
}
/**
*
* event emitted by chaincode. Used only with Init or Invoke.
* This event is then stored (currently)
* with Block.NonHashData.TransactionResult
*
*
* .protos.ChaincodeEvent chaincode_event = 6 [json_name = "chaincodeEvent"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder>
getChaincodeEventFieldBuilder() {
if (chaincodeEventBuilder_ == null) {
chaincodeEventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventOrBuilder>(
getChaincodeEvent(),
getParentForChildren(),
isClean());
chaincodeEvent_ = null;
}
return chaincodeEventBuilder_;
}
private java.lang.Object channelId_ = "";
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @return The channelId.
*/
public java.lang.String getChannelId() {
java.lang.Object ref = channelId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @return The bytes for channelId.
*/
public com.google.protobuf.ByteString
getChannelIdBytes() {
java.lang.Object ref = channelId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @param value The channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
channelId_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @return This builder for chaining.
*/
public Builder clearChannelId() {
channelId_ = getDefaultInstance().getChannelId();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* channel id
*
*
* string channel_id = 7 [json_name = "channelId"];
* @param value The bytes for channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
channelId_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeMessage)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeMessage)
private static final org.hyperledger.fabric.protos.peer.ChaincodeMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeMessage();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
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.ChaincodeMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy