org.hyperledger.fabric.protos.peer.FabricTransaction 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 project
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: peer/transaction.proto
package org.hyperledger.fabric.protos.peer;
public final class FabricTransaction {
private FabricTransaction() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code protos.TxValidationCode}
*/
public enum TxValidationCode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* VALID = 0;
*/
VALID(0),
/**
* NIL_ENVELOPE = 1;
*/
NIL_ENVELOPE(1),
/**
* BAD_PAYLOAD = 2;
*/
BAD_PAYLOAD(2),
/**
* BAD_COMMON_HEADER = 3;
*/
BAD_COMMON_HEADER(3),
/**
* BAD_CREATOR_SIGNATURE = 4;
*/
BAD_CREATOR_SIGNATURE(4),
/**
* INVALID_ENDORSER_TRANSACTION = 5;
*/
INVALID_ENDORSER_TRANSACTION(5),
/**
* INVALID_CONFIG_TRANSACTION = 6;
*/
INVALID_CONFIG_TRANSACTION(6),
/**
* UNSUPPORTED_TX_PAYLOAD = 7;
*/
UNSUPPORTED_TX_PAYLOAD(7),
/**
* BAD_PROPOSAL_TXID = 8;
*/
BAD_PROPOSAL_TXID(8),
/**
* DUPLICATE_TXID = 9;
*/
DUPLICATE_TXID(9),
/**
* ENDORSEMENT_POLICY_FAILURE = 10;
*/
ENDORSEMENT_POLICY_FAILURE(10),
/**
* MVCC_READ_CONFLICT = 11;
*/
MVCC_READ_CONFLICT(11),
/**
* PHANTOM_READ_CONFLICT = 12;
*/
PHANTOM_READ_CONFLICT(12),
/**
* UNKNOWN_TX_TYPE = 13;
*/
UNKNOWN_TX_TYPE(13),
/**
* TARGET_CHAIN_NOT_FOUND = 14;
*/
TARGET_CHAIN_NOT_FOUND(14),
/**
* MARSHAL_TX_ERROR = 15;
*/
MARSHAL_TX_ERROR(15),
/**
* NIL_TXACTION = 16;
*/
NIL_TXACTION(16),
/**
* EXPIRED_CHAINCODE = 17;
*/
EXPIRED_CHAINCODE(17),
/**
* CHAINCODE_VERSION_CONFLICT = 18;
*/
CHAINCODE_VERSION_CONFLICT(18),
/**
* BAD_HEADER_EXTENSION = 19;
*/
BAD_HEADER_EXTENSION(19),
/**
* BAD_CHANNEL_HEADER = 20;
*/
BAD_CHANNEL_HEADER(20),
/**
* BAD_RESPONSE_PAYLOAD = 21;
*/
BAD_RESPONSE_PAYLOAD(21),
/**
* BAD_RWSET = 22;
*/
BAD_RWSET(22),
/**
* ILLEGAL_WRITESET = 23;
*/
ILLEGAL_WRITESET(23),
/**
* INVALID_OTHER_REASON = 255;
*/
INVALID_OTHER_REASON(255),
UNRECOGNIZED(-1),
;
/**
* VALID = 0;
*/
public static final int VALID_VALUE = 0;
/**
* NIL_ENVELOPE = 1;
*/
public static final int NIL_ENVELOPE_VALUE = 1;
/**
* BAD_PAYLOAD = 2;
*/
public static final int BAD_PAYLOAD_VALUE = 2;
/**
* BAD_COMMON_HEADER = 3;
*/
public static final int BAD_COMMON_HEADER_VALUE = 3;
/**
* BAD_CREATOR_SIGNATURE = 4;
*/
public static final int BAD_CREATOR_SIGNATURE_VALUE = 4;
/**
* INVALID_ENDORSER_TRANSACTION = 5;
*/
public static final int INVALID_ENDORSER_TRANSACTION_VALUE = 5;
/**
* INVALID_CONFIG_TRANSACTION = 6;
*/
public static final int INVALID_CONFIG_TRANSACTION_VALUE = 6;
/**
* UNSUPPORTED_TX_PAYLOAD = 7;
*/
public static final int UNSUPPORTED_TX_PAYLOAD_VALUE = 7;
/**
* BAD_PROPOSAL_TXID = 8;
*/
public static final int BAD_PROPOSAL_TXID_VALUE = 8;
/**
* DUPLICATE_TXID = 9;
*/
public static final int DUPLICATE_TXID_VALUE = 9;
/**
* ENDORSEMENT_POLICY_FAILURE = 10;
*/
public static final int ENDORSEMENT_POLICY_FAILURE_VALUE = 10;
/**
* MVCC_READ_CONFLICT = 11;
*/
public static final int MVCC_READ_CONFLICT_VALUE = 11;
/**
* PHANTOM_READ_CONFLICT = 12;
*/
public static final int PHANTOM_READ_CONFLICT_VALUE = 12;
/**
* UNKNOWN_TX_TYPE = 13;
*/
public static final int UNKNOWN_TX_TYPE_VALUE = 13;
/**
* TARGET_CHAIN_NOT_FOUND = 14;
*/
public static final int TARGET_CHAIN_NOT_FOUND_VALUE = 14;
/**
* MARSHAL_TX_ERROR = 15;
*/
public static final int MARSHAL_TX_ERROR_VALUE = 15;
/**
* NIL_TXACTION = 16;
*/
public static final int NIL_TXACTION_VALUE = 16;
/**
* EXPIRED_CHAINCODE = 17;
*/
public static final int EXPIRED_CHAINCODE_VALUE = 17;
/**
* CHAINCODE_VERSION_CONFLICT = 18;
*/
public static final int CHAINCODE_VERSION_CONFLICT_VALUE = 18;
/**
* BAD_HEADER_EXTENSION = 19;
*/
public static final int BAD_HEADER_EXTENSION_VALUE = 19;
/**
* BAD_CHANNEL_HEADER = 20;
*/
public static final int BAD_CHANNEL_HEADER_VALUE = 20;
/**
* BAD_RESPONSE_PAYLOAD = 21;
*/
public static final int BAD_RESPONSE_PAYLOAD_VALUE = 21;
/**
* BAD_RWSET = 22;
*/
public static final int BAD_RWSET_VALUE = 22;
/**
* ILLEGAL_WRITESET = 23;
*/
public static final int ILLEGAL_WRITESET_VALUE = 23;
/**
* INVALID_OTHER_REASON = 255;
*/
public static final int INVALID_OTHER_REASON_VALUE = 255;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TxValidationCode valueOf(int value) {
return forNumber(value);
}
public static TxValidationCode forNumber(int value) {
switch (value) {
case 0: return VALID;
case 1: return NIL_ENVELOPE;
case 2: return BAD_PAYLOAD;
case 3: return BAD_COMMON_HEADER;
case 4: return BAD_CREATOR_SIGNATURE;
case 5: return INVALID_ENDORSER_TRANSACTION;
case 6: return INVALID_CONFIG_TRANSACTION;
case 7: return UNSUPPORTED_TX_PAYLOAD;
case 8: return BAD_PROPOSAL_TXID;
case 9: return DUPLICATE_TXID;
case 10: return ENDORSEMENT_POLICY_FAILURE;
case 11: return MVCC_READ_CONFLICT;
case 12: return PHANTOM_READ_CONFLICT;
case 13: return UNKNOWN_TX_TYPE;
case 14: return TARGET_CHAIN_NOT_FOUND;
case 15: return MARSHAL_TX_ERROR;
case 16: return NIL_TXACTION;
case 17: return EXPIRED_CHAINCODE;
case 18: return CHAINCODE_VERSION_CONFLICT;
case 19: return BAD_HEADER_EXTENSION;
case 20: return BAD_CHANNEL_HEADER;
case 21: return BAD_RESPONSE_PAYLOAD;
case 22: return BAD_RWSET;
case 23: return ILLEGAL_WRITESET;
case 255: return INVALID_OTHER_REASON;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TxValidationCode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TxValidationCode findValueByNumber(int number) {
return TxValidationCode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.getDescriptor().getEnumTypes().get(0);
}
private static final TxValidationCode[] VALUES = values();
public static TxValidationCode 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 TxValidationCode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.TxValidationCode)
}
public interface SignedTransactionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.SignedTransaction)
com.google.protobuf.MessageOrBuilder {
/**
*
* The bytes of the Transaction. NDD
*
*
* optional bytes transaction_bytes = 1;
*/
com.google.protobuf.ByteString getTransactionBytes();
/**
*
* Signature of the transactionBytes The public key of the signature is in
* the header field of TransactionAction There might be multiple
* TransactionAction, so multiple headers, but there should be same
* transactor identity (cert) in all headers
*
*
* optional bytes signature = 2;
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* This message is necessary to facilitate the verification of the signature
* (in the signature field) over the bytes of the transaction (in the
* transactionBytes field).
*
*
* Protobuf type {@code protos.SignedTransaction}
*/
public static final class SignedTransaction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.SignedTransaction)
SignedTransactionOrBuilder {
// Use SignedTransaction.newBuilder() to construct.
private SignedTransaction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SignedTransaction() {
transactionBytes_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private SignedTransaction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
transactionBytes_ = input.readBytes();
break;
}
case 18: {
signature_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_SignedTransaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_SignedTransaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.Builder.class);
}
public static final int TRANSACTION_BYTES_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString transactionBytes_;
/**
*
* The bytes of the Transaction. NDD
*
*
* optional bytes transaction_bytes = 1;
*/
public com.google.protobuf.ByteString getTransactionBytes() {
return transactionBytes_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
*
* Signature of the transactionBytes The public key of the signature is in
* the header field of TransactionAction There might be multiple
* TransactionAction, so multiple headers, but there should be same
* transactor identity (cert) in all headers
*
*
* optional bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!transactionBytes_.isEmpty()) {
output.writeBytes(1, transactionBytes_);
}
if (!signature_.isEmpty()) {
output.writeBytes(2, signature_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!transactionBytes_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, transactionBytes_);
}
if (!signature_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, signature_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction other = (org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction) obj;
boolean result = true;
result = result && getTransactionBytes()
.equals(other.getTransactionBytes());
result = result && getSignature()
.equals(other.getSignature());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TRANSACTION_BYTES_FIELD_NUMBER;
hash = (53 * hash) + getTransactionBytes().hashCode();
hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
hash = (53 * hash) + getSignature().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction 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.FabricTransaction.SignedTransaction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction 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.FabricTransaction.SignedTransaction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction 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.FabricTransaction.SignedTransaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction 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.FabricTransaction.SignedTransaction 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.FabricTransaction.SignedTransaction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* This message is necessary to facilitate the verification of the signature
* (in the signature field) over the bytes of the transaction (in the
* transactionBytes field).
*
*
* Protobuf type {@code protos.SignedTransaction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.SignedTransaction)
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransactionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_SignedTransaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_SignedTransaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
transactionBytes_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_SignedTransaction_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction result = new org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction(this);
result.transactionBytes_ = transactionBytes_;
result.signature_ = signature_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction.getDefaultInstance()) return this;
if (other.getTransactionBytes() != com.google.protobuf.ByteString.EMPTY) {
setTransactionBytes(other.getTransactionBytes());
}
if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) {
setSignature(other.getSignature());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString transactionBytes_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The bytes of the Transaction. NDD
*
*
* optional bytes transaction_bytes = 1;
*/
public com.google.protobuf.ByteString getTransactionBytes() {
return transactionBytes_;
}
/**
*
* The bytes of the Transaction. NDD
*
*
* optional bytes transaction_bytes = 1;
*/
public Builder setTransactionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
transactionBytes_ = value;
onChanged();
return this;
}
/**
*
* The bytes of the Transaction. NDD
*
*
* optional bytes transaction_bytes = 1;
*/
public Builder clearTransactionBytes() {
transactionBytes_ = getDefaultInstance().getTransactionBytes();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Signature of the transactionBytes The public key of the signature is in
* the header field of TransactionAction There might be multiple
* TransactionAction, so multiple headers, but there should be same
* transactor identity (cert) in all headers
*
*
* optional bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
*
* Signature of the transactionBytes The public key of the signature is in
* the header field of TransactionAction There might be multiple
* TransactionAction, so multiple headers, but there should be same
* transactor identity (cert) in all headers
*
*
* optional bytes signature = 2;
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
*
* Signature of the transactionBytes The public key of the signature is in
* the header field of TransactionAction There might be multiple
* TransactionAction, so multiple headers, but there should be same
* transactor identity (cert) in all headers
*
*
* optional bytes signature = 2;
*/
public Builder clearSignature() {
signature_ = getDefaultInstance().getSignature();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.SignedTransaction)
}
// @@protoc_insertion_point(class_scope:protos.SignedTransaction)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SignedTransaction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SignedTransaction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.SignedTransaction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProcessedTransactionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ProcessedTransaction)
com.google.protobuf.MessageOrBuilder {
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
boolean hasTransactionEnvelope();
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
org.hyperledger.fabric.protos.common.Common.Envelope getTransactionEnvelope();
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder getTransactionEnvelopeOrBuilder();
/**
*
* An indication of whether the transaction was validated or invalidated by committing peer
*
*
* optional int32 validationCode = 2;
*/
int getValidationCode();
}
/**
*
* ProcessedTransaction wraps an Envelope that includes a transaction along with an indication
* of whether the transaction was validated or invalidated by committing peer.
* The use case is that GetTransactionByID API needs to retrieve the transaction Envelope
* from block storage, and return it to a client, and indicate whether the transaction
* was validated or invalidated by committing peer. So that the originally submitted
* transaction Envelope is not modified, the ProcessedTransaction wrapper is returned.
*
*
* Protobuf type {@code protos.ProcessedTransaction}
*/
public static final class ProcessedTransaction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ProcessedTransaction)
ProcessedTransactionOrBuilder {
// Use ProcessedTransaction.newBuilder() to construct.
private ProcessedTransaction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ProcessedTransaction() {
validationCode_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ProcessedTransaction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.fabric.protos.common.Common.Envelope.Builder subBuilder = null;
if (transactionEnvelope_ != null) {
subBuilder = transactionEnvelope_.toBuilder();
}
transactionEnvelope_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.Envelope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(transactionEnvelope_);
transactionEnvelope_ = subBuilder.buildPartial();
}
break;
}
case 16: {
validationCode_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ProcessedTransaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ProcessedTransaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.Builder.class);
}
public static final int TRANSACTIONENVELOPE_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.common.Common.Envelope transactionEnvelope_;
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public boolean hasTransactionEnvelope() {
return transactionEnvelope_ != null;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public org.hyperledger.fabric.protos.common.Common.Envelope getTransactionEnvelope() {
return transactionEnvelope_ == null ? org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance() : transactionEnvelope_;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder getTransactionEnvelopeOrBuilder() {
return getTransactionEnvelope();
}
public static final int VALIDATIONCODE_FIELD_NUMBER = 2;
private int validationCode_;
/**
*
* An indication of whether the transaction was validated or invalidated by committing peer
*
*
* optional int32 validationCode = 2;
*/
public int getValidationCode() {
return validationCode_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (transactionEnvelope_ != null) {
output.writeMessage(1, getTransactionEnvelope());
}
if (validationCode_ != 0) {
output.writeInt32(2, validationCode_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (transactionEnvelope_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTransactionEnvelope());
}
if (validationCode_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, validationCode_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction other = (org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction) obj;
boolean result = true;
result = result && (hasTransactionEnvelope() == other.hasTransactionEnvelope());
if (hasTransactionEnvelope()) {
result = result && getTransactionEnvelope()
.equals(other.getTransactionEnvelope());
}
result = result && (getValidationCode()
== other.getValidationCode());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasTransactionEnvelope()) {
hash = (37 * hash) + TRANSACTIONENVELOPE_FIELD_NUMBER;
hash = (53 * hash) + getTransactionEnvelope().hashCode();
}
hash = (37 * hash) + VALIDATIONCODE_FIELD_NUMBER;
hash = (53 * hash) + getValidationCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction 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.FabricTransaction.ProcessedTransaction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction 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.FabricTransaction.ProcessedTransaction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction 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.FabricTransaction.ProcessedTransaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction 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.FabricTransaction.ProcessedTransaction 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.FabricTransaction.ProcessedTransaction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ProcessedTransaction wraps an Envelope that includes a transaction along with an indication
* of whether the transaction was validated or invalidated by committing peer.
* The use case is that GetTransactionByID API needs to retrieve the transaction Envelope
* from block storage, and return it to a client, and indicate whether the transaction
* was validated or invalidated by committing peer. So that the originally submitted
* transaction Envelope is not modified, the ProcessedTransaction wrapper is returned.
*
*
* Protobuf type {@code protos.ProcessedTransaction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ProcessedTransaction)
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransactionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ProcessedTransaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ProcessedTransaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (transactionEnvelopeBuilder_ == null) {
transactionEnvelope_ = null;
} else {
transactionEnvelope_ = null;
transactionEnvelopeBuilder_ = null;
}
validationCode_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ProcessedTransaction_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction result = new org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction(this);
if (transactionEnvelopeBuilder_ == null) {
result.transactionEnvelope_ = transactionEnvelope_;
} else {
result.transactionEnvelope_ = transactionEnvelopeBuilder_.build();
}
result.validationCode_ = validationCode_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction.getDefaultInstance()) return this;
if (other.hasTransactionEnvelope()) {
mergeTransactionEnvelope(other.getTransactionEnvelope());
}
if (other.getValidationCode() != 0) {
setValidationCode(other.getValidationCode());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.common.Common.Envelope transactionEnvelope_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.common.Common.Envelope.Builder, org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder> transactionEnvelopeBuilder_;
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public boolean hasTransactionEnvelope() {
return transactionEnvelopeBuilder_ != null || transactionEnvelope_ != null;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public org.hyperledger.fabric.protos.common.Common.Envelope getTransactionEnvelope() {
if (transactionEnvelopeBuilder_ == null) {
return transactionEnvelope_ == null ? org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance() : transactionEnvelope_;
} else {
return transactionEnvelopeBuilder_.getMessage();
}
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public Builder setTransactionEnvelope(org.hyperledger.fabric.protos.common.Common.Envelope value) {
if (transactionEnvelopeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
transactionEnvelope_ = value;
onChanged();
} else {
transactionEnvelopeBuilder_.setMessage(value);
}
return this;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public Builder setTransactionEnvelope(
org.hyperledger.fabric.protos.common.Common.Envelope.Builder builderForValue) {
if (transactionEnvelopeBuilder_ == null) {
transactionEnvelope_ = builderForValue.build();
onChanged();
} else {
transactionEnvelopeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public Builder mergeTransactionEnvelope(org.hyperledger.fabric.protos.common.Common.Envelope value) {
if (transactionEnvelopeBuilder_ == null) {
if (transactionEnvelope_ != null) {
transactionEnvelope_ =
org.hyperledger.fabric.protos.common.Common.Envelope.newBuilder(transactionEnvelope_).mergeFrom(value).buildPartial();
} else {
transactionEnvelope_ = value;
}
onChanged();
} else {
transactionEnvelopeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public Builder clearTransactionEnvelope() {
if (transactionEnvelopeBuilder_ == null) {
transactionEnvelope_ = null;
onChanged();
} else {
transactionEnvelope_ = null;
transactionEnvelopeBuilder_ = null;
}
return this;
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public org.hyperledger.fabric.protos.common.Common.Envelope.Builder getTransactionEnvelopeBuilder() {
onChanged();
return getTransactionEnvelopeFieldBuilder().getBuilder();
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
public org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder getTransactionEnvelopeOrBuilder() {
if (transactionEnvelopeBuilder_ != null) {
return transactionEnvelopeBuilder_.getMessageOrBuilder();
} else {
return transactionEnvelope_ == null ?
org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance() : transactionEnvelope_;
}
}
/**
*
* An Envelope which includes a processed transaction
*
*
* optional .common.Envelope transactionEnvelope = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.common.Common.Envelope.Builder, org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder>
getTransactionEnvelopeFieldBuilder() {
if (transactionEnvelopeBuilder_ == null) {
transactionEnvelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.common.Common.Envelope.Builder, org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder>(
getTransactionEnvelope(),
getParentForChildren(),
isClean());
transactionEnvelope_ = null;
}
return transactionEnvelopeBuilder_;
}
private int validationCode_ ;
/**
*
* An indication of whether the transaction was validated or invalidated by committing peer
*
*
* optional int32 validationCode = 2;
*/
public int getValidationCode() {
return validationCode_;
}
/**
*
* An indication of whether the transaction was validated or invalidated by committing peer
*
*
* optional int32 validationCode = 2;
*/
public Builder setValidationCode(int value) {
validationCode_ = value;
onChanged();
return this;
}
/**
*
* An indication of whether the transaction was validated or invalidated by committing peer
*
*
* optional int32 validationCode = 2;
*/
public Builder clearValidationCode() {
validationCode_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ProcessedTransaction)
}
// @@protoc_insertion_point(class_scope:protos.ProcessedTransaction)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ProcessedTransaction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProcessedTransaction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ProcessedTransaction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TransactionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Transaction)
com.google.protobuf.MessageOrBuilder {
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
java.util.List
getActionsList();
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getActions(int index);
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
int getActionsCount();
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
java.util.List
getActionsOrBuilderList();
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder getActionsOrBuilder(
int index);
}
/**
*
* The transaction to be sent to the ordering service. A transaction contains
* one or more TransactionAction. Each TransactionAction binds a proposal to
* potentially multiple actions. The transaction is atomic meaning that either
* all actions in the transaction will be committed or none will. Note that
* while a Transaction might include more than one Header, the Header.creator
* field must be the same in each.
* A single client is free to issue a number of independent Proposal, each with
* their header (Header) and request payload (ChaincodeProposalPayload). Each
* proposal is independently endorsed generating an action
* (ProposalResponsePayload) with one signature per Endorser. Any number of
* independent proposals (and their action) might be included in a transaction
* to ensure that they are treated atomically.
*
*
* Protobuf type {@code protos.Transaction}
*/
public static final class Transaction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Transaction)
TransactionOrBuilder {
// Use Transaction.newBuilder() to construct.
private Transaction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Transaction() {
actions_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Transaction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
actions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
actions_.add(
input.readMessage(org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
actions_ = java.util.Collections.unmodifiableList(actions_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_Transaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.Builder.class);
}
public static final int ACTIONS_FIELD_NUMBER = 1;
private java.util.List actions_;
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public java.util.List getActionsList() {
return actions_;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public java.util.List
getActionsOrBuilderList() {
return actions_;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public int getActionsCount() {
return actions_.size();
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getActions(int index) {
return actions_.get(index);
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder getActionsOrBuilder(
int index) {
return actions_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < actions_.size(); i++) {
output.writeMessage(1, actions_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < actions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, actions_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction other = (org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction) obj;
boolean result = true;
result = result && getActionsList()
.equals(other.getActionsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getActionsCount() > 0) {
hash = (37 * hash) + ACTIONS_FIELD_NUMBER;
hash = (53 * hash) + getActionsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction 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.FabricTransaction.Transaction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction 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.FabricTransaction.Transaction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction 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.FabricTransaction.Transaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction 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.FabricTransaction.Transaction 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.FabricTransaction.Transaction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The transaction to be sent to the ordering service. A transaction contains
* one or more TransactionAction. Each TransactionAction binds a proposal to
* potentially multiple actions. The transaction is atomic meaning that either
* all actions in the transaction will be committed or none will. Note that
* while a Transaction might include more than one Header, the Header.creator
* field must be the same in each.
* A single client is free to issue a number of independent Proposal, each with
* their header (Header) and request payload (ChaincodeProposalPayload). Each
* proposal is independently endorsed generating an action
* (ProposalResponsePayload) with one signature per Endorser. Any number of
* independent proposals (and their action) might be included in a transaction
* to ensure that they are treated atomically.
*
*
* Protobuf type {@code protos.Transaction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Transaction)
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_Transaction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getActionsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (actionsBuilder_ == null) {
actions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
actionsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_Transaction_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction result = new org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction(this);
int from_bitField0_ = bitField0_;
if (actionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
actions_ = java.util.Collections.unmodifiableList(actions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.actions_ = actions_;
} else {
result.actions_ = actionsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction.getDefaultInstance()) return this;
if (actionsBuilder_ == null) {
if (!other.actions_.isEmpty()) {
if (actions_.isEmpty()) {
actions_ = other.actions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureActionsIsMutable();
actions_.addAll(other.actions_);
}
onChanged();
}
} else {
if (!other.actions_.isEmpty()) {
if (actionsBuilder_.isEmpty()) {
actionsBuilder_.dispose();
actionsBuilder_ = null;
actions_ = other.actions_;
bitField0_ = (bitField0_ & ~0x00000001);
actionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getActionsFieldBuilder() : null;
} else {
actionsBuilder_.addAllMessages(other.actions_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List actions_ =
java.util.Collections.emptyList();
private void ensureActionsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
actions_ = new java.util.ArrayList(actions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder> actionsBuilder_;
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public java.util.List getActionsList() {
if (actionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(actions_);
} else {
return actionsBuilder_.getMessageList();
}
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public int getActionsCount() {
if (actionsBuilder_ == null) {
return actions_.size();
} else {
return actionsBuilder_.getCount();
}
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getActions(int index) {
if (actionsBuilder_ == null) {
return actions_.get(index);
} else {
return actionsBuilder_.getMessage(index);
}
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder setActions(
int index, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction value) {
if (actionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActionsIsMutable();
actions_.set(index, value);
onChanged();
} else {
actionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder setActions(
int index, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder builderForValue) {
if (actionsBuilder_ == null) {
ensureActionsIsMutable();
actions_.set(index, builderForValue.build());
onChanged();
} else {
actionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder addActions(org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction value) {
if (actionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActionsIsMutable();
actions_.add(value);
onChanged();
} else {
actionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder addActions(
int index, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction value) {
if (actionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActionsIsMutable();
actions_.add(index, value);
onChanged();
} else {
actionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder addActions(
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder builderForValue) {
if (actionsBuilder_ == null) {
ensureActionsIsMutable();
actions_.add(builderForValue.build());
onChanged();
} else {
actionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder addActions(
int index, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder builderForValue) {
if (actionsBuilder_ == null) {
ensureActionsIsMutable();
actions_.add(index, builderForValue.build());
onChanged();
} else {
actionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder addAllActions(
java.lang.Iterable values) {
if (actionsBuilder_ == null) {
ensureActionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, actions_);
onChanged();
} else {
actionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder clearActions() {
if (actionsBuilder_ == null) {
actions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
actionsBuilder_.clear();
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public Builder removeActions(int index) {
if (actionsBuilder_ == null) {
ensureActionsIsMutable();
actions_.remove(index);
onChanged();
} else {
actionsBuilder_.remove(index);
}
return this;
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder getActionsBuilder(
int index) {
return getActionsFieldBuilder().getBuilder(index);
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder getActionsOrBuilder(
int index) {
if (actionsBuilder_ == null) {
return actions_.get(index); } else {
return actionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public java.util.List
getActionsOrBuilderList() {
if (actionsBuilder_ != null) {
return actionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(actions_);
}
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder addActionsBuilder() {
return getActionsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.getDefaultInstance());
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder addActionsBuilder(
int index) {
return getActionsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.getDefaultInstance());
}
/**
*
* The payload is an array of TransactionAction. An array is necessary to
* accommodate multiple actions per transaction
*
*
* repeated .protos.TransactionAction actions = 1;
*/
public java.util.List
getActionsBuilderList() {
return getActionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder>
getActionsFieldBuilder() {
if (actionsBuilder_ == null) {
actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder>(
actions_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
actions_ = null;
}
return actionsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.Transaction)
}
// @@protoc_insertion_point(class_scope:protos.Transaction)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Transaction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Transaction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.Transaction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TransactionActionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.TransactionAction)
com.google.protobuf.MessageOrBuilder {
/**
*
* The header of the proposal action, which is the proposal header
*
*
* optional bytes header = 1;
*/
com.google.protobuf.ByteString getHeader();
/**
*
* The payload of the action as defined by the type in the header For
* chaincode, it's the bytes of ChaincodeActionPayload
*
*
* optional bytes payload = 2;
*/
com.google.protobuf.ByteString getPayload();
}
/**
*
* TransactionAction binds a proposal to its action. The type field in the
* header dictates the type of action to be applied to the ledger.
*
*
* Protobuf type {@code protos.TransactionAction}
*/
public static final class TransactionAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.TransactionAction)
TransactionActionOrBuilder {
// Use TransactionAction.newBuilder() to construct.
private TransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private TransactionAction() {
header_ = com.google.protobuf.ByteString.EMPTY;
payload_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private TransactionAction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
header_ = input.readBytes();
break;
}
case 18: {
payload_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_TransactionAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_TransactionAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder.class);
}
public static final int HEADER_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString header_;
/**
*
* The header of the proposal action, which is the proposal header
*
*
* optional bytes header = 1;
*/
public com.google.protobuf.ByteString getHeader() {
return header_;
}
public static final int PAYLOAD_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString payload_;
/**
*
* The payload of the action as defined by the type in the header For
* chaincode, it's the bytes of ChaincodeActionPayload
*
*
* optional bytes payload = 2;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!header_.isEmpty()) {
output.writeBytes(1, header_);
}
if (!payload_.isEmpty()) {
output.writeBytes(2, payload_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!header_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, header_);
}
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, payload_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction other = (org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction) obj;
boolean result = true;
result = result && getHeader()
.equals(other.getHeader());
result = result && getPayload()
.equals(other.getPayload());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction 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.FabricTransaction.TransactionAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction 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.FabricTransaction.TransactionAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction 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.FabricTransaction.TransactionAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction 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.FabricTransaction.TransactionAction 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.FabricTransaction.TransactionAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* TransactionAction binds a proposal to its action. The type field in the
* header dictates the type of action to be applied to the ledger.
*
*
* Protobuf type {@code protos.TransactionAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.TransactionAction)
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_TransactionAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_TransactionAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
header_ = com.google.protobuf.ByteString.EMPTY;
payload_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_TransactionAction_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction result = new org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction(this);
result.header_ = header_;
result.payload_ = payload_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction.getDefaultInstance()) return this;
if (other.getHeader() != com.google.protobuf.ByteString.EMPTY) {
setHeader(other.getHeader());
}
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString header_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The header of the proposal action, which is the proposal header
*
*
* optional bytes header = 1;
*/
public com.google.protobuf.ByteString getHeader() {
return header_;
}
/**
*
* The header of the proposal action, which is the proposal header
*
*
* optional bytes header = 1;
*/
public Builder setHeader(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
return this;
}
/**
*
* The header of the proposal action, which is the proposal header
*
*
* optional bytes header = 1;
*/
public Builder clearHeader() {
header_ = getDefaultInstance().getHeader();
onChanged();
return this;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The payload of the action as defined by the type in the header For
* chaincode, it's the bytes of ChaincodeActionPayload
*
*
* optional bytes payload = 2;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* The payload of the action as defined by the type in the header For
* chaincode, it's the bytes of ChaincodeActionPayload
*
*
* optional bytes payload = 2;
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
*
* The payload of the action as defined by the type in the header For
* chaincode, it's the bytes of ChaincodeActionPayload
*
*
* optional bytes payload = 2;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.TransactionAction)
}
// @@protoc_insertion_point(class_scope:protos.TransactionAction)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TransactionAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TransactionAction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.TransactionAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeActionPayloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeActionPayload)
com.google.protobuf.MessageOrBuilder {
/**
*
* This field contains the bytes of the ChaincodeProposalPayload message from
* the original invocation (essentially the arguments) after the application
* of the visibility function. The main visibility modes are "full" (the
* entire ChaincodeProposalPayload message is included here), "hash" (only
* the hash of the ChaincodeProposalPayload message is included) or
* "nothing". This field will be used to check the consistency of
* ProposalResponsePayload.proposalHash. For the CHAINCODE type,
* ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader ||
* f(ChaincodeProposalPayload)) where f is the visibility function.
*
*
* optional bytes chaincode_proposal_payload = 1;
*/
com.google.protobuf.ByteString getChaincodeProposalPayload();
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
boolean hasAction();
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getAction();
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder getActionOrBuilder();
}
/**
*
* ChaincodeActionPayload is the message to be used for the TransactionAction's
* payload when the Header's type is set to CHAINCODE. It carries the
* chaincodeProposalPayload and an endorsed action to apply to the ledger.
*
*
* Protobuf type {@code protos.ChaincodeActionPayload}
*/
public static final class ChaincodeActionPayload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeActionPayload)
ChaincodeActionPayloadOrBuilder {
// Use ChaincodeActionPayload.newBuilder() to construct.
private ChaincodeActionPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeActionPayload() {
chaincodeProposalPayload_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeActionPayload(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
chaincodeProposalPayload_ = input.readBytes();
break;
}
case 18: {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder subBuilder = null;
if (action_ != null) {
subBuilder = action_.toBuilder();
}
action_ = input.readMessage(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(action_);
action_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeActionPayload_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeActionPayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.Builder.class);
}
public static final int CHAINCODE_PROPOSAL_PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString chaincodeProposalPayload_;
/**
*
* This field contains the bytes of the ChaincodeProposalPayload message from
* the original invocation (essentially the arguments) after the application
* of the visibility function. The main visibility modes are "full" (the
* entire ChaincodeProposalPayload message is included here), "hash" (only
* the hash of the ChaincodeProposalPayload message is included) or
* "nothing". This field will be used to check the consistency of
* ProposalResponsePayload.proposalHash. For the CHAINCODE type,
* ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader ||
* f(ChaincodeProposalPayload)) where f is the visibility function.
*
*
* optional bytes chaincode_proposal_payload = 1;
*/
public com.google.protobuf.ByteString getChaincodeProposalPayload() {
return chaincodeProposalPayload_;
}
public static final int ACTION_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction action_;
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public boolean hasAction() {
return action_ != null;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getAction() {
return action_ == null ? org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.getDefaultInstance() : action_;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder getActionOrBuilder() {
return getAction();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!chaincodeProposalPayload_.isEmpty()) {
output.writeBytes(1, chaincodeProposalPayload_);
}
if (action_ != null) {
output.writeMessage(2, getAction());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!chaincodeProposalPayload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, chaincodeProposalPayload_);
}
if (action_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getAction());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload other = (org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload) obj;
boolean result = true;
result = result && getChaincodeProposalPayload()
.equals(other.getChaincodeProposalPayload());
result = result && (hasAction() == other.hasAction());
if (hasAction()) {
result = result && getAction()
.equals(other.getAction());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CHAINCODE_PROPOSAL_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeProposalPayload().hashCode();
if (hasAction()) {
hash = (37 * hash) + ACTION_FIELD_NUMBER;
hash = (53 * hash) + getAction().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload 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.FabricTransaction.ChaincodeActionPayload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload 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.FabricTransaction.ChaincodeActionPayload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload 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.FabricTransaction.ChaincodeActionPayload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload 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.FabricTransaction.ChaincodeActionPayload 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.FabricTransaction.ChaincodeActionPayload parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeActionPayload is the message to be used for the TransactionAction's
* payload when the Header's type is set to CHAINCODE. It carries the
* chaincodeProposalPayload and an endorsed action to apply to the ledger.
*
*
* Protobuf type {@code protos.ChaincodeActionPayload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeActionPayload)
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeActionPayload_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeActionPayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
chaincodeProposalPayload_ = com.google.protobuf.ByteString.EMPTY;
if (actionBuilder_ == null) {
action_ = null;
} else {
action_ = null;
actionBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeActionPayload_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload result = new org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload(this);
result.chaincodeProposalPayload_ = chaincodeProposalPayload_;
if (actionBuilder_ == null) {
result.action_ = action_;
} else {
result.action_ = actionBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload.getDefaultInstance()) return this;
if (other.getChaincodeProposalPayload() != com.google.protobuf.ByteString.EMPTY) {
setChaincodeProposalPayload(other.getChaincodeProposalPayload());
}
if (other.hasAction()) {
mergeAction(other.getAction());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString chaincodeProposalPayload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This field contains the bytes of the ChaincodeProposalPayload message from
* the original invocation (essentially the arguments) after the application
* of the visibility function. The main visibility modes are "full" (the
* entire ChaincodeProposalPayload message is included here), "hash" (only
* the hash of the ChaincodeProposalPayload message is included) or
* "nothing". This field will be used to check the consistency of
* ProposalResponsePayload.proposalHash. For the CHAINCODE type,
* ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader ||
* f(ChaincodeProposalPayload)) where f is the visibility function.
*
*
* optional bytes chaincode_proposal_payload = 1;
*/
public com.google.protobuf.ByteString getChaincodeProposalPayload() {
return chaincodeProposalPayload_;
}
/**
*
* This field contains the bytes of the ChaincodeProposalPayload message from
* the original invocation (essentially the arguments) after the application
* of the visibility function. The main visibility modes are "full" (the
* entire ChaincodeProposalPayload message is included here), "hash" (only
* the hash of the ChaincodeProposalPayload message is included) or
* "nothing". This field will be used to check the consistency of
* ProposalResponsePayload.proposalHash. For the CHAINCODE type,
* ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader ||
* f(ChaincodeProposalPayload)) where f is the visibility function.
*
*
* optional bytes chaincode_proposal_payload = 1;
*/
public Builder setChaincodeProposalPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
chaincodeProposalPayload_ = value;
onChanged();
return this;
}
/**
*
* This field contains the bytes of the ChaincodeProposalPayload message from
* the original invocation (essentially the arguments) after the application
* of the visibility function. The main visibility modes are "full" (the
* entire ChaincodeProposalPayload message is included here), "hash" (only
* the hash of the ChaincodeProposalPayload message is included) or
* "nothing". This field will be used to check the consistency of
* ProposalResponsePayload.proposalHash. For the CHAINCODE type,
* ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader ||
* f(ChaincodeProposalPayload)) where f is the visibility function.
*
*
* optional bytes chaincode_proposal_payload = 1;
*/
public Builder clearChaincodeProposalPayload() {
chaincodeProposalPayload_ = getDefaultInstance().getChaincodeProposalPayload();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction action_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder> actionBuilder_;
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public boolean hasAction() {
return actionBuilder_ != null || action_ != null;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getAction() {
if (actionBuilder_ == null) {
return action_ == null ? org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.getDefaultInstance() : action_;
} else {
return actionBuilder_.getMessage();
}
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public Builder setAction(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction value) {
if (actionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
action_ = value;
onChanged();
} else {
actionBuilder_.setMessage(value);
}
return this;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public Builder setAction(
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder builderForValue) {
if (actionBuilder_ == null) {
action_ = builderForValue.build();
onChanged();
} else {
actionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public Builder mergeAction(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction value) {
if (actionBuilder_ == null) {
if (action_ != null) {
action_ =
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.newBuilder(action_).mergeFrom(value).buildPartial();
} else {
action_ = value;
}
onChanged();
} else {
actionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public Builder clearAction() {
if (actionBuilder_ == null) {
action_ = null;
onChanged();
} else {
action_ = null;
actionBuilder_ = null;
}
return this;
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder getActionBuilder() {
onChanged();
return getActionFieldBuilder().getBuilder();
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder getActionOrBuilder() {
if (actionBuilder_ != null) {
return actionBuilder_.getMessageOrBuilder();
} else {
return action_ == null ?
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.getDefaultInstance() : action_;
}
}
/**
*
* The list of actions to apply to the ledger
*
*
* optional .protos.ChaincodeEndorsedAction action = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder>
getActionFieldBuilder() {
if (actionBuilder_ == null) {
actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder>(
getAction(),
getParentForChildren(),
isClean());
action_ = null;
}
return actionBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeActionPayload)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeActionPayload)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ChaincodeActionPayload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeActionPayload(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeActionPayload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeEndorsedActionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeEndorsedAction)
com.google.protobuf.MessageOrBuilder {
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* optional bytes proposal_response_payload = 1;
*/
com.google.protobuf.ByteString getProposalResponsePayload();
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
java.util.List
getEndorsementsList();
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement getEndorsements(int index);
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
int getEndorsementsCount();
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
java.util.List
getEndorsementsOrBuilderList();
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder getEndorsementsOrBuilder(
int index);
}
/**
*
* ChaincodeEndorsedAction carries information about the endorsement of a
* specific proposal
*
*
* Protobuf type {@code protos.ChaincodeEndorsedAction}
*/
public static final class ChaincodeEndorsedAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeEndorsedAction)
ChaincodeEndorsedActionOrBuilder {
// Use ChaincodeEndorsedAction.newBuilder() to construct.
private ChaincodeEndorsedAction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeEndorsedAction() {
proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
endorsements_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeEndorsedAction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
proposalResponsePayload_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
endorsements_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
endorsements_.add(
input.readMessage(org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
endorsements_ = java.util.Collections.unmodifiableList(endorsements_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeEndorsedAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder.class);
}
private int bitField0_;
public static final int PROPOSAL_RESPONSE_PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString proposalResponsePayload_;
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* optional bytes proposal_response_payload = 1;
*/
public com.google.protobuf.ByteString getProposalResponsePayload() {
return proposalResponsePayload_;
}
public static final int ENDORSEMENTS_FIELD_NUMBER = 2;
private java.util.List endorsements_;
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public java.util.List getEndorsementsList() {
return endorsements_;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public java.util.List
getEndorsementsOrBuilderList() {
return endorsements_;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public int getEndorsementsCount() {
return endorsements_.size();
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement getEndorsements(int index) {
return endorsements_.get(index);
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder getEndorsementsOrBuilder(
int index) {
return endorsements_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!proposalResponsePayload_.isEmpty()) {
output.writeBytes(1, proposalResponsePayload_);
}
for (int i = 0; i < endorsements_.size(); i++) {
output.writeMessage(2, endorsements_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!proposalResponsePayload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, proposalResponsePayload_);
}
for (int i = 0; i < endorsements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, endorsements_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction other = (org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction) obj;
boolean result = true;
result = result && getProposalResponsePayload()
.equals(other.getProposalResponsePayload());
result = result && getEndorsementsList()
.equals(other.getEndorsementsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + PROPOSAL_RESPONSE_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getProposalResponsePayload().hashCode();
if (getEndorsementsCount() > 0) {
hash = (37 * hash) + ENDORSEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getEndorsementsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction 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.FabricTransaction.ChaincodeEndorsedAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction 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.FabricTransaction.ChaincodeEndorsedAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction 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.FabricTransaction.ChaincodeEndorsedAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction 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.FabricTransaction.ChaincodeEndorsedAction 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.FabricTransaction.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeEndorsedAction carries information about the endorsement of a
* specific proposal
*
*
* Protobuf type {@code protos.ChaincodeEndorsedAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeEndorsedAction)
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeEndorsedAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.class, org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEndorsementsFieldBuilder();
}
}
public Builder clear() {
super.clear();
proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
if (endorsementsBuilder_ == null) {
endorsements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
endorsementsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.getDefaultInstance();
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction build() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction buildPartial() {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction result = new org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.proposalResponsePayload_ = proposalResponsePayload_;
if (endorsementsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
endorsements_ = java.util.Collections.unmodifiableList(endorsements_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.endorsements_ = endorsements_;
} else {
result.endorsements_ = endorsementsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction other) {
if (other == org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction.getDefaultInstance()) return this;
if (other.getProposalResponsePayload() != com.google.protobuf.ByteString.EMPTY) {
setProposalResponsePayload(other.getProposalResponsePayload());
}
if (endorsementsBuilder_ == null) {
if (!other.endorsements_.isEmpty()) {
if (endorsements_.isEmpty()) {
endorsements_ = other.endorsements_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEndorsementsIsMutable();
endorsements_.addAll(other.endorsements_);
}
onChanged();
}
} else {
if (!other.endorsements_.isEmpty()) {
if (endorsementsBuilder_.isEmpty()) {
endorsementsBuilder_.dispose();
endorsementsBuilder_ = null;
endorsements_ = other.endorsements_;
bitField0_ = (bitField0_ & ~0x00000002);
endorsementsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEndorsementsFieldBuilder() : null;
} else {
endorsementsBuilder_.addAllMessages(other.endorsements_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* optional bytes proposal_response_payload = 1;
*/
public com.google.protobuf.ByteString getProposalResponsePayload() {
return proposalResponsePayload_;
}
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* optional bytes proposal_response_payload = 1;
*/
public Builder setProposalResponsePayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
proposalResponsePayload_ = value;
onChanged();
return this;
}
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* optional bytes proposal_response_payload = 1;
*/
public Builder clearProposalResponsePayload() {
proposalResponsePayload_ = getDefaultInstance().getProposalResponsePayload();
onChanged();
return this;
}
private java.util.List endorsements_ =
java.util.Collections.emptyList();
private void ensureEndorsementsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
endorsements_ = new java.util.ArrayList(endorsements_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder, org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder> endorsementsBuilder_;
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public java.util.List getEndorsementsList() {
if (endorsementsBuilder_ == null) {
return java.util.Collections.unmodifiableList(endorsements_);
} else {
return endorsementsBuilder_.getMessageList();
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public int getEndorsementsCount() {
if (endorsementsBuilder_ == null) {
return endorsements_.size();
} else {
return endorsementsBuilder_.getCount();
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement getEndorsements(int index) {
if (endorsementsBuilder_ == null) {
return endorsements_.get(index);
} else {
return endorsementsBuilder_.getMessage(index);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder setEndorsements(
int index, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.set(index, value);
onChanged();
} else {
endorsementsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder setEndorsements(
int index, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.set(index, builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder addEndorsements(org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.add(value);
onChanged();
} else {
endorsementsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder addEndorsements(
int index, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.add(index, value);
onChanged();
} else {
endorsementsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder addEndorsements(
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.add(builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder addEndorsements(
int index, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.add(index, builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder addAllEndorsements(
java.lang.Iterable values) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, endorsements_);
onChanged();
} else {
endorsementsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder clearEndorsements() {
if (endorsementsBuilder_ == null) {
endorsements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
endorsementsBuilder_.clear();
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public Builder removeEndorsements(int index) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.remove(index);
onChanged();
} else {
endorsementsBuilder_.remove(index);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder getEndorsementsBuilder(
int index) {
return getEndorsementsFieldBuilder().getBuilder(index);
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder getEndorsementsOrBuilder(
int index) {
if (endorsementsBuilder_ == null) {
return endorsements_.get(index); } else {
return endorsementsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public java.util.List
getEndorsementsOrBuilderList() {
if (endorsementsBuilder_ != null) {
return endorsementsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(endorsements_);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder addEndorsementsBuilder() {
return getEndorsementsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.getDefaultInstance());
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder addEndorsementsBuilder(
int index) {
return getEndorsementsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.getDefaultInstance());
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2;
*/
public java.util.List
getEndorsementsBuilderList() {
return getEndorsementsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder, org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder>
getEndorsementsFieldBuilder() {
if (endorsementsBuilder_ == null) {
endorsementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement, org.hyperledger.fabric.protos.peer.FabricProposalResponse.Endorsement.Builder, org.hyperledger.fabric.protos.peer.FabricProposalResponse.EndorsementOrBuilder>(
endorsements_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
endorsements_ = null;
}
return endorsementsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeEndorsedAction)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeEndorsedAction)
private static final org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction();
}
public static org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ChaincodeEndorsedAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeEndorsedAction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.peer.FabricTransaction.ChaincodeEndorsedAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_SignedTransaction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_SignedTransaction_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ProcessedTransaction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ProcessedTransaction_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Transaction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Transaction_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_TransactionAction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_TransactionAction_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeActionPayload_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeActionPayload_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeEndorsedAction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeEndorsedAction_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\026peer/transaction.proto\022\006protos\032\037google" +
"/protobuf/timestamp.proto\032\034peer/proposal" +
"_response.proto\032\023common/common.proto\"A\n\021" +
"SignedTransaction\022\031\n\021transaction_bytes\030\001" +
" \001(\014\022\021\n\tsignature\030\002 \001(\014\"]\n\024ProcessedTran" +
"saction\022-\n\023transactionEnvelope\030\001 \001(\0132\020.c" +
"ommon.Envelope\022\026\n\016validationCode\030\002 \001(\005\"9" +
"\n\013Transaction\022*\n\007actions\030\001 \003(\0132\031.protos." +
"TransactionAction\"4\n\021TransactionAction\022\016" +
"\n\006header\030\001 \001(\014\022\017\n\007payload\030\002 \001(\014\"m\n\026Chain",
"codeActionPayload\022\"\n\032chaincode_proposal_" +
"payload\030\001 \001(\014\022/\n\006action\030\002 \001(\0132\037.protos.C" +
"haincodeEndorsedAction\"g\n\027ChaincodeEndor" +
"sedAction\022!\n\031proposal_response_payload\030\001" +
" \001(\014\022)\n\014endorsements\030\002 \003(\0132\023.protos.Endo" +
"rsement*\352\004\n\020TxValidationCode\022\t\n\005VALID\020\000\022" +
"\020\n\014NIL_ENVELOPE\020\001\022\017\n\013BAD_PAYLOAD\020\002\022\025\n\021BA" +
"D_COMMON_HEADER\020\003\022\031\n\025BAD_CREATOR_SIGNATU" +
"RE\020\004\022 \n\034INVALID_ENDORSER_TRANSACTION\020\005\022\036" +
"\n\032INVALID_CONFIG_TRANSACTION\020\006\022\032\n\026UNSUPP",
"ORTED_TX_PAYLOAD\020\007\022\025\n\021BAD_PROPOSAL_TXID\020" +
"\010\022\022\n\016DUPLICATE_TXID\020\t\022\036\n\032ENDORSEMENT_POL" +
"ICY_FAILURE\020\n\022\026\n\022MVCC_READ_CONFLICT\020\013\022\031\n" +
"\025PHANTOM_READ_CONFLICT\020\014\022\023\n\017UNKNOWN_TX_T" +
"YPE\020\r\022\032\n\026TARGET_CHAIN_NOT_FOUND\020\016\022\024\n\020MAR" +
"SHAL_TX_ERROR\020\017\022\020\n\014NIL_TXACTION\020\020\022\025\n\021EXP" +
"IRED_CHAINCODE\020\021\022\036\n\032CHAINCODE_VERSION_CO" +
"NFLICT\020\022\022\030\n\024BAD_HEADER_EXTENSION\020\023\022\026\n\022BA" +
"D_CHANNEL_HEADER\020\024\022\030\n\024BAD_RESPONSE_PAYLO" +
"AD\020\025\022\r\n\tBAD_RWSET\020\026\022\024\n\020ILLEGAL_WRITESET\020",
"\027\022\031\n\024INVALID_OTHER_REASON\020\377\001Bb\n\"org.hype" +
"rledger.fabric.protos.peerB\021FabricTransa" +
"ctionZ)github.com/hyperledger/fabric/pro" +
"tos/peerb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
org.hyperledger.fabric.protos.peer.FabricProposalResponse.getDescriptor(),
org.hyperledger.fabric.protos.common.Common.getDescriptor(),
}, assigner);
internal_static_protos_SignedTransaction_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_SignedTransaction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_SignedTransaction_descriptor,
new java.lang.String[] { "TransactionBytes", "Signature", });
internal_static_protos_ProcessedTransaction_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_ProcessedTransaction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ProcessedTransaction_descriptor,
new java.lang.String[] { "TransactionEnvelope", "ValidationCode", });
internal_static_protos_Transaction_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_Transaction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Transaction_descriptor,
new java.lang.String[] { "Actions", });
internal_static_protos_TransactionAction_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_protos_TransactionAction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_TransactionAction_descriptor,
new java.lang.String[] { "Header", "Payload", });
internal_static_protos_ChaincodeActionPayload_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_protos_ChaincodeActionPayload_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeActionPayload_descriptor,
new java.lang.String[] { "ChaincodeProposalPayload", "Action", });
internal_static_protos_ChaincodeEndorsedAction_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_protos_ChaincodeEndorsedAction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeEndorsedAction_descriptor,
new java.lang.String[] { "ProposalResponsePayload", "Endorsements", });
com.google.protobuf.TimestampProto.getDescriptor();
org.hyperledger.fabric.protos.peer.FabricProposalResponse.getDescriptor();
org.hyperledger.fabric.protos.common.Common.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}