Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* 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
*
* 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;
/**
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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.
*
* 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_;
/**
*
*
* 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.
*
* 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.
*
* 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 .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
*
* 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
*
* 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
*
* 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
*
* 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
*