org.hyperledger.fabric.protos.peer.ProposalPackage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: peer/proposal.proto
package org.hyperledger.fabric.protos.peer;
public final class ProposalPackage {
private ProposalPackage() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface SignedProposalOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.SignedProposal)
com.google.protobuf.MessageOrBuilder {
/**
*
* The bytes of Proposal
*
*
* bytes proposal_bytes = 1;
*/
com.google.protobuf.ByteString getProposalBytes();
/**
*
* Signaure over proposalBytes; this signature is to be verified against
* the creator identity contained in the header of the Proposal message
* marshaled as proposalBytes
*
*
* bytes signature = 2;
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* This structure is necessary to sign the proposal which contains the header
* and the payload. Without this structure, we would have to concatenate the
* header and the payload to verify the signature, which could be expensive
* with large payload
* When an endorser receives a SignedProposal message, it should verify the
* signature over the proposal bytes. This verification requires the following
* steps:
* 1. Verification of the validity of the certificate that was used to produce
* the signature. The certificate will be available once proposalBytes has
* been unmarshalled to a Proposal message, and Proposal.header has been
* unmarshalled to a Header message. While this unmarshalling-before-verifying
* might not be ideal, it is unavoidable because i) the signature needs to also
* protect the signing certificate; ii) it is desirable that Header is created
* once by the client and never changed (for the sake of accountability and
* non-repudiation). Note also that it is actually impossible to conclusively
* verify the validity of the certificate included in a Proposal, because the
* proposal needs to first be endorsed and ordered with respect to certificate
* expiration transactions. Still, it is useful to pre-filter expired
* certificates at this stage.
* 2. Verification that the certificate is trusted (signed by a trusted CA) and
* that it is allowed to transact with us (with respect to some ACLs);
* 3. Verification that the signature on proposalBytes is valid;
* 4. Detect replay attacks;
*
*
* Protobuf type {@code protos.SignedProposal}
*/
public static final class SignedProposal extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.SignedProposal)
SignedProposalOrBuilder {
private static final long serialVersionUID = 0L;
// Use SignedProposal.newBuilder() to construct.
private SignedProposal(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SignedProposal() {
proposalBytes_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SignedProposal(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
proposalBytes_ = input.readBytes();
break;
}
case 18: {
signature_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_SignedProposal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_SignedProposal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.class, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder.class);
}
public static final int PROPOSAL_BYTES_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString proposalBytes_;
/**
*
* The bytes of Proposal
*
*
* bytes proposal_bytes = 1;
*/
public com.google.protobuf.ByteString getProposalBytes() {
return proposalBytes_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
*
* Signaure over proposalBytes; this signature is to be verified against
* the creator identity contained in the header of the Proposal message
* marshaled as proposalBytes
*
*
* bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!proposalBytes_.isEmpty()) {
output.writeBytes(1, proposalBytes_);
}
if (!signature_.isEmpty()) {
output.writeBytes(2, signature_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!proposalBytes_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, proposalBytes_);
}
if (!signature_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, signature_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal other = (org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal) obj;
if (!getProposalBytes()
.equals(other.getProposalBytes())) return false;
if (!getSignature()
.equals(other.getSignature())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PROPOSAL_BYTES_FIELD_NUMBER;
hash = (53 * hash) + getProposalBytes().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.ProposalPackage.SignedProposal parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal 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.ProposalPackage.SignedProposal parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal 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.ProposalPackage.SignedProposal parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal 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.ProposalPackage.SignedProposal parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal 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.ProposalPackage.SignedProposal 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.ProposalPackage.SignedProposal parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* This structure is necessary to sign the proposal which contains the header
* and the payload. Without this structure, we would have to concatenate the
* header and the payload to verify the signature, which could be expensive
* with large payload
* When an endorser receives a SignedProposal message, it should verify the
* signature over the proposal bytes. This verification requires the following
* steps:
* 1. Verification of the validity of the certificate that was used to produce
* the signature. The certificate will be available once proposalBytes has
* been unmarshalled to a Proposal message, and Proposal.header has been
* unmarshalled to a Header message. While this unmarshalling-before-verifying
* might not be ideal, it is unavoidable because i) the signature needs to also
* protect the signing certificate; ii) it is desirable that Header is created
* once by the client and never changed (for the sake of accountability and
* non-repudiation). Note also that it is actually impossible to conclusively
* verify the validity of the certificate included in a Proposal, because the
* proposal needs to first be endorsed and ordered with respect to certificate
* expiration transactions. Still, it is useful to pre-filter expired
* certificates at this stage.
* 2. Verification that the certificate is trusted (signed by a trusted CA) and
* that it is allowed to transact with us (with respect to some ACLs);
* 3. Verification that the signature on proposalBytes is valid;
* 4. Detect replay attacks;
*
*
* Protobuf type {@code protos.SignedProposal}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.SignedProposal)
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_SignedProposal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_SignedProposal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.class, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
proposalBytes_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_SignedProposal_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal build() {
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal result = new org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal(this);
result.proposalBytes_ = proposalBytes_;
result.signature_ = signature_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance()) return this;
if (other.getProposalBytes() != com.google.protobuf.ByteString.EMPTY) {
setProposalBytes(other.getProposalBytes());
}
if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) {
setSignature(other.getSignature());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString proposalBytes_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The bytes of Proposal
*
*
* bytes proposal_bytes = 1;
*/
public com.google.protobuf.ByteString getProposalBytes() {
return proposalBytes_;
}
/**
*
* The bytes of Proposal
*
*
* bytes proposal_bytes = 1;
*/
public Builder setProposalBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
proposalBytes_ = value;
onChanged();
return this;
}
/**
*
* The bytes of Proposal
*
*
* bytes proposal_bytes = 1;
*/
public Builder clearProposalBytes() {
proposalBytes_ = getDefaultInstance().getProposalBytes();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Signaure over proposalBytes; this signature is to be verified against
* the creator identity contained in the header of the Proposal message
* marshaled as proposalBytes
*
*
* bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
*
* Signaure over proposalBytes; this signature is to be verified against
* the creator identity contained in the header of the Proposal message
* marshaled as proposalBytes
*
*
* bytes signature = 2;
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
*
* Signaure over proposalBytes; this signature is to be verified against
* the creator identity contained in the header of the Proposal message
* marshaled as proposalBytes
*
*
* bytes signature = 2;
*/
public Builder clearSignature() {
signature_ = getDefaultInstance().getSignature();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.SignedProposal)
}
// @@protoc_insertion_point(class_scope:protos.SignedProposal)
private static final org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal();
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SignedProposal parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SignedProposal(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProposalOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Proposal)
com.google.protobuf.MessageOrBuilder {
/**
*
* The header of the proposal. It is the bytes of the Header
*
*
* bytes header = 1;
*/
com.google.protobuf.ByteString getHeader();
/**
*
* The payload of the proposal as defined by the type in the proposal
* header.
*
*
* bytes payload = 2;
*/
com.google.protobuf.ByteString getPayload();
/**
*
* Optional extensions to the proposal. Its content depends on the Header's
* type field. For the type CHAINCODE, it might be the bytes of a
* ChaincodeAction message.
*
*
* bytes extension = 3;
*/
com.google.protobuf.ByteString getExtension();
}
/**
*
* A Proposal is sent to an endorser for endorsement. The proposal contains:
* 1. A header which should be unmarshaled to a Header message. Note that
* Header is both the header of a Proposal and of a Transaction, in that i)
* both headers should be unmarshaled to this message; and ii) it is used to
* compute cryptographic hashes and signatures. The header has fields common
* to all proposals/transactions. In addition it has a type field for
* additional customization. An example of this is the ChaincodeHeaderExtension
* message used to extend the Header for type CHAINCODE.
* 2. A payload whose type depends on the header's type field.
* 3. An extension whose type depends on the header's type field.
* Let us see an example. For type CHAINCODE (see the Header message),
* we have the following:
* 1. The header is a Header message whose extensions field is a
* ChaincodeHeaderExtension message.
* 2. The payload is a ChaincodeProposalPayload message.
* 3. The extension is a ChaincodeAction that might be used to ask the
* endorsers to endorse a specific ChaincodeAction, thus emulating the
* submitting peer model.
*
*
* Protobuf type {@code protos.Proposal}
*/
public static final class Proposal extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Proposal)
ProposalOrBuilder {
private static final long serialVersionUID = 0L;
// Use Proposal.newBuilder() to construct.
private Proposal(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Proposal() {
header_ = com.google.protobuf.ByteString.EMPTY;
payload_ = com.google.protobuf.ByteString.EMPTY;
extension_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Proposal(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
header_ = input.readBytes();
break;
}
case 18: {
payload_ = input.readBytes();
break;
}
case 26: {
extension_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_Proposal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_Proposal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.class, org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.Builder.class);
}
public static final int HEADER_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString header_;
/**
*
* The header of the proposal. It is the bytes of the Header
*
*
* 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 proposal as defined by the type in the proposal
* header.
*
*
* bytes payload = 2;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int EXTENSION_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString extension_;
/**
*
* Optional extensions to the proposal. Its content depends on the Header's
* type field. For the type CHAINCODE, it might be the bytes of a
* ChaincodeAction message.
*
*
* bytes extension = 3;
*/
public com.google.protobuf.ByteString getExtension() {
return extension_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!header_.isEmpty()) {
output.writeBytes(1, header_);
}
if (!payload_.isEmpty()) {
output.writeBytes(2, payload_);
}
if (!extension_.isEmpty()) {
output.writeBytes(3, extension_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
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_);
}
if (!extension_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, extension_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal other = (org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal) obj;
if (!getHeader()
.equals(other.getHeader())) return false;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getExtension()
.equals(other.getExtension())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + EXTENSION_FIELD_NUMBER;
hash = (53 * hash) + getExtension().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal 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.ProposalPackage.Proposal parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal 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.ProposalPackage.Proposal parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal 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.ProposalPackage.Proposal parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal 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.ProposalPackage.Proposal 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.ProposalPackage.Proposal parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A Proposal is sent to an endorser for endorsement. The proposal contains:
* 1. A header which should be unmarshaled to a Header message. Note that
* Header is both the header of a Proposal and of a Transaction, in that i)
* both headers should be unmarshaled to this message; and ii) it is used to
* compute cryptographic hashes and signatures. The header has fields common
* to all proposals/transactions. In addition it has a type field for
* additional customization. An example of this is the ChaincodeHeaderExtension
* message used to extend the Header for type CHAINCODE.
* 2. A payload whose type depends on the header's type field.
* 3. An extension whose type depends on the header's type field.
* Let us see an example. For type CHAINCODE (see the Header message),
* we have the following:
* 1. The header is a Header message whose extensions field is a
* ChaincodeHeaderExtension message.
* 2. The payload is a ChaincodeProposalPayload message.
* 3. The extension is a ChaincodeAction that might be used to ask the
* endorsers to endorse a specific ChaincodeAction, thus emulating the
* submitting peer model.
*
*
* Protobuf type {@code protos.Proposal}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Proposal)
org.hyperledger.fabric.protos.peer.ProposalPackage.ProposalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_Proposal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_Proposal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.class, org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
header_ = com.google.protobuf.ByteString.EMPTY;
payload_ = com.google.protobuf.ByteString.EMPTY;
extension_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_Proposal_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal build() {
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal result = new org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal(this);
result.header_ = header_;
result.payload_ = payload_;
result.extension_ = extension_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal.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());
}
if (other.getExtension() != com.google.protobuf.ByteString.EMPTY) {
setExtension(other.getExtension());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal) 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. It is the bytes of the Header
*
*
* bytes header = 1;
*/
public com.google.protobuf.ByteString getHeader() {
return header_;
}
/**
*
* The header of the proposal. It is the bytes of the Header
*
*
* 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. It is the bytes of the Header
*
*
* 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 proposal as defined by the type in the proposal
* header.
*
*
* bytes payload = 2;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* The payload of the proposal as defined by the type in the proposal
* header.
*
*
* 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 proposal as defined by the type in the proposal
* header.
*
*
* bytes payload = 2;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private com.google.protobuf.ByteString extension_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Optional extensions to the proposal. Its content depends on the Header's
* type field. For the type CHAINCODE, it might be the bytes of a
* ChaincodeAction message.
*
*
* bytes extension = 3;
*/
public com.google.protobuf.ByteString getExtension() {
return extension_;
}
/**
*
* Optional extensions to the proposal. Its content depends on the Header's
* type field. For the type CHAINCODE, it might be the bytes of a
* ChaincodeAction message.
*
*
* bytes extension = 3;
*/
public Builder setExtension(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
extension_ = value;
onChanged();
return this;
}
/**
*
* Optional extensions to the proposal. Its content depends on the Header's
* type field. For the type CHAINCODE, it might be the bytes of a
* ChaincodeAction message.
*
*
* bytes extension = 3;
*/
public Builder clearExtension() {
extension_ = getDefaultInstance().getExtension();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.Proposal)
}
// @@protoc_insertion_point(class_scope:protos.Proposal)
private static final org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal();
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Proposal parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Proposal(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.Proposal getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeHeaderExtensionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeHeaderExtension)
com.google.protobuf.MessageOrBuilder {
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
boolean hasChaincodeId();
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId();
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder();
}
/**
*
* ChaincodeHeaderExtension is the Header's extentions message to be used when
* the Header's type is CHAINCODE. This extensions is used to specify which
* chaincode to invoke and what should appear on the ledger.
*
*
* Protobuf type {@code protos.ChaincodeHeaderExtension}
*/
public static final class ChaincodeHeaderExtension extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeHeaderExtension)
ChaincodeHeaderExtensionOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeHeaderExtension.newBuilder() to construct.
private ChaincodeHeaderExtension(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeHeaderExtension() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeHeaderExtension(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder subBuilder = null;
if (chaincodeId_ != null) {
subBuilder = chaincodeId_.toBuilder();
}
chaincodeId_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(chaincodeId_);
chaincodeId_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeHeaderExtension_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeHeaderExtension_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.Builder.class);
}
public static final int CHAINCODE_ID_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeId_ != null;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
return getChaincodeId();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (chaincodeId_ != null) {
output.writeMessage(2, getChaincodeId());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (chaincodeId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getChaincodeId());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension) obj;
if (hasChaincodeId() != other.hasChaincodeId()) return false;
if (hasChaincodeId()) {
if (!getChaincodeId()
.equals(other.getChaincodeId())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasChaincodeId()) {
hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeId().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension 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.ProposalPackage.ChaincodeHeaderExtension parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension 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.ProposalPackage.ChaincodeHeaderExtension parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension 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.ProposalPackage.ChaincodeHeaderExtension parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension 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.ProposalPackage.ChaincodeHeaderExtension 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.ProposalPackage.ChaincodeHeaderExtension parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeHeaderExtension is the Header's extentions message to be used when
* the Header's type is CHAINCODE. This extensions is used to specify which
* chaincode to invoke and what should appear on the ledger.
*
*
* Protobuf type {@code protos.ChaincodeHeaderExtension}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeHeaderExtension)
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtensionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeHeaderExtension_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeHeaderExtension_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeHeaderExtension_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension build() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension result = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension(this);
if (chaincodeIdBuilder_ == null) {
result.chaincodeId_ = chaincodeId_;
} else {
result.chaincodeId_ = chaincodeIdBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension.getDefaultInstance()) return this;
if (other.hasChaincodeId()) {
mergeChaincodeId(other.getChaincodeId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder> chaincodeIdBuilder_;
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeIdBuilder_ != null || chaincodeId_ != null;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
if (chaincodeIdBuilder_ == null) {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
} else {
return chaincodeIdBuilder_.getMessage();
}
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder setChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeId_ = value;
onChanged();
} else {
chaincodeIdBuilder_.setMessage(value);
}
return this;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder setChaincodeId(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder builderForValue) {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = builderForValue.build();
onChanged();
} else {
chaincodeIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (chaincodeId_ != null) {
chaincodeId_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial();
} else {
chaincodeId_ = value;
}
onChanged();
} else {
chaincodeIdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder clearChaincodeId() {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
onChanged();
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder getChaincodeIdBuilder() {
onChanged();
return getChaincodeIdFieldBuilder().getBuilder();
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
if (chaincodeIdBuilder_ != null) {
return chaincodeIdBuilder_.getMessageOrBuilder();
} else {
return chaincodeId_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
}
/**
*
* The ID of the chaincode to target.
*
*
* .protos.ChaincodeID chaincode_id = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>
getChaincodeIdFieldBuilder() {
if (chaincodeIdBuilder_ == null) {
chaincodeIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>(
getChaincodeId(),
getParentForChildren(),
isClean());
chaincodeId_ = null;
}
return chaincodeIdBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeHeaderExtension)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeHeaderExtension)
private static final org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension();
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeHeaderExtension parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeHeaderExtension(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeProposalPayloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeProposalPayload)
com.google.protobuf.MessageOrBuilder {
/**
*
* Input contains the arguments for this invocation. If this invocation
* deploys a new chaincode, ESCC/VSCC are part of this field.
* This is usually a marshaled ChaincodeInvocationSpec
*
*
* bytes input = 1;
*/
com.google.protobuf.ByteString getInput();
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
int getTransientMapCount();
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
boolean containsTransientMap(
java.lang.String key);
/**
* Use {@link #getTransientMapMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getTransientMap();
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
java.util.Map
getTransientMapMap();
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
com.google.protobuf.ByteString getTransientMapOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue);
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
com.google.protobuf.ByteString getTransientMapOrThrow(
java.lang.String key);
}
/**
*
* ChaincodeProposalPayload is the Proposal's payload message to be used when
* the Header's type is CHAINCODE. It contains the arguments for this
* invocation.
*
*
* Protobuf type {@code protos.ChaincodeProposalPayload}
*/
public static final class ChaincodeProposalPayload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeProposalPayload)
ChaincodeProposalPayloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeProposalPayload.newBuilder() to construct.
private ChaincodeProposalPayload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeProposalPayload() {
input_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeProposalPayload(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
transientMap_ = com.google.protobuf.MapField.newMapField(
TransientMapDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
transientMap__ = input.readMessage(
TransientMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
transientMap_.getMutableMap().put(
transientMap__.getKey(), transientMap__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetTransientMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.Builder.class);
}
private int bitField0_;
public static final int INPUT_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString input_;
/**
*
* Input contains the arguments for this invocation. If this invocation
* deploys a new chaincode, ESCC/VSCC are part of this field.
* This is usually a marshaled ChaincodeInvocationSpec
*
*
* bytes input = 1;
*/
public com.google.protobuf.ByteString getInput() {
return input_;
}
public static final int TRANSIENTMAP_FIELD_NUMBER = 2;
private static final class TransientMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.ByteString> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.BYTES,
com.google.protobuf.ByteString.EMPTY);
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> transientMap_;
private com.google.protobuf.MapField
internalGetTransientMap() {
if (transientMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TransientMapDefaultEntryHolder.defaultEntry);
}
return transientMap_;
}
public int getTransientMapCount() {
return internalGetTransientMap().getMap().size();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public boolean containsTransientMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTransientMap().getMap().containsKey(key);
}
/**
* Use {@link #getTransientMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTransientMap() {
return getTransientMapMap();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public java.util.Map getTransientMapMap() {
return internalGetTransientMap().getMap();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public com.google.protobuf.ByteString getTransientMapOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTransientMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public com.google.protobuf.ByteString getTransientMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTransientMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!input_.isEmpty()) {
output.writeBytes(1, input_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetTransientMap(),
TransientMapDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!input_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, input_);
}
for (java.util.Map.Entry entry
: internalGetTransientMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
transientMap__ = TransientMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, transientMap__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload other = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload) obj;
if (!getInput()
.equals(other.getInput())) return false;
if (!internalGetTransientMap().equals(
other.internalGetTransientMap())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
if (!internalGetTransientMap().getMap().isEmpty()) {
hash = (37 * hash) + TRANSIENTMAP_FIELD_NUMBER;
hash = (53 * hash) + internalGetTransientMap().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload 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.ProposalPackage.ChaincodeProposalPayload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload 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.ProposalPackage.ChaincodeProposalPayload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload 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.ProposalPackage.ChaincodeProposalPayload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload 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.ProposalPackage.ChaincodeProposalPayload 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.ProposalPackage.ChaincodeProposalPayload parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeProposalPayload is the Proposal's payload message to be used when
* the Header's type is CHAINCODE. It contains the arguments for this
* invocation.
*
*
* Protobuf type {@code protos.ChaincodeProposalPayload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeProposalPayload)
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetTransientMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableTransientMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
input_ = com.google.protobuf.ByteString.EMPTY;
internalGetMutableTransientMap().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeProposalPayload_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload build() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload result = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.input_ = input_;
result.transientMap_ = internalGetTransientMap();
result.transientMap_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload.getDefaultInstance()) return this;
if (other.getInput() != com.google.protobuf.ByteString.EMPTY) {
setInput(other.getInput());
}
internalGetMutableTransientMap().mergeFrom(
other.internalGetTransientMap());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Input contains the arguments for this invocation. If this invocation
* deploys a new chaincode, ESCC/VSCC are part of this field.
* This is usually a marshaled ChaincodeInvocationSpec
*
*
* bytes input = 1;
*/
public com.google.protobuf.ByteString getInput() {
return input_;
}
/**
*
* Input contains the arguments for this invocation. If this invocation
* deploys a new chaincode, ESCC/VSCC are part of this field.
* This is usually a marshaled ChaincodeInvocationSpec
*
*
* bytes input = 1;
*/
public Builder setInput(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
return this;
}
/**
*
* Input contains the arguments for this invocation. If this invocation
* deploys a new chaincode, ESCC/VSCC are part of this field.
* This is usually a marshaled ChaincodeInvocationSpec
*
*
* bytes input = 1;
*/
public Builder clearInput() {
input_ = getDefaultInstance().getInput();
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> transientMap_;
private com.google.protobuf.MapField
internalGetTransientMap() {
if (transientMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TransientMapDefaultEntryHolder.defaultEntry);
}
return transientMap_;
}
private com.google.protobuf.MapField
internalGetMutableTransientMap() {
onChanged();;
if (transientMap_ == null) {
transientMap_ = com.google.protobuf.MapField.newMapField(
TransientMapDefaultEntryHolder.defaultEntry);
}
if (!transientMap_.isMutable()) {
transientMap_ = transientMap_.copy();
}
return transientMap_;
}
public int getTransientMapCount() {
return internalGetTransientMap().getMap().size();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public boolean containsTransientMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTransientMap().getMap().containsKey(key);
}
/**
* Use {@link #getTransientMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTransientMap() {
return getTransientMapMap();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public java.util.Map getTransientMapMap() {
return internalGetTransientMap().getMap();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public com.google.protobuf.ByteString getTransientMapOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTransientMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public com.google.protobuf.ByteString getTransientMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTransientMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearTransientMap() {
internalGetMutableTransientMap().getMutableMap()
.clear();
return this;
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public Builder removeTransientMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTransientMap().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTransientMap() {
return internalGetMutableTransientMap().getMutableMap();
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public Builder putTransientMap(
java.lang.String key,
com.google.protobuf.ByteString value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTransientMap().getMutableMap()
.put(key, value);
return this;
}
/**
*
* TransientMap contains data (e.g. cryptographic material) that might be used
* to implement some form of application-level confidentiality. The contents
* of this field are supposed to always be omitted from the transaction and
* excluded from the ledger.
*
*
* map<string, bytes> TransientMap = 2;
*/
public Builder putAllTransientMap(
java.util.Map values) {
internalGetMutableTransientMap().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeProposalPayload)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeProposalPayload)
private static final org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload();
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeProposalPayload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeProposalPayload(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeProposalPayload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeActionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeAction)
com.google.protobuf.MessageOrBuilder {
/**
*
* This field contains the read set and the write set produced by the
* chaincode executing this invocation.
*
*
* bytes results = 1;
*/
com.google.protobuf.ByteString getResults();
/**
*
* This field contains the events generated by the chaincode executing this
* invocation.
*
*
* bytes events = 2;
*/
com.google.protobuf.ByteString getEvents();
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
boolean hasResponse();
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getResponse();
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder getResponseOrBuilder();
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
boolean hasChaincodeId();
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId();
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder();
}
/**
*
* ChaincodeAction contains the actions the events generated by the execution
* of the chaincode.
*
*
* Protobuf type {@code protos.ChaincodeAction}
*/
public static final class ChaincodeAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeAction)
ChaincodeActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeAction.newBuilder() to construct.
private ChaincodeAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeAction() {
results_ = com.google.protobuf.ByteString.EMPTY;
events_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeAction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
results_ = input.readBytes();
break;
}
case 18: {
events_ = input.readBytes();
break;
}
case 26: {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder subBuilder = null;
if (response_ != null) {
subBuilder = response_.toBuilder();
}
response_ = input.readMessage(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(response_);
response_ = subBuilder.buildPartial();
}
break;
}
case 34: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder subBuilder = null;
if (chaincodeId_ != null) {
subBuilder = chaincodeId_.toBuilder();
}
chaincodeId_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(chaincodeId_);
chaincodeId_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.Builder.class);
}
public static final int RESULTS_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString results_;
/**
*
* This field contains the read set and the write set produced by the
* chaincode executing this invocation.
*
*
* bytes results = 1;
*/
public com.google.protobuf.ByteString getResults() {
return results_;
}
public static final int EVENTS_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString events_;
/**
*
* This field contains the events generated by the chaincode executing this
* invocation.
*
*
* bytes events = 2;
*/
public com.google.protobuf.ByteString getEvents() {
return events_;
}
public static final int RESPONSE_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response response_;
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public boolean hasResponse() {
return response_ != null;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getResponse() {
return response_ == null ? org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance() : response_;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder getResponseOrBuilder() {
return getResponse();
}
public static final int CHAINCODE_ID_FIELD_NUMBER = 4;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public boolean hasChaincodeId() {
return chaincodeId_ != null;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
return getChaincodeId();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!results_.isEmpty()) {
output.writeBytes(1, results_);
}
if (!events_.isEmpty()) {
output.writeBytes(2, events_);
}
if (response_ != null) {
output.writeMessage(3, getResponse());
}
if (chaincodeId_ != null) {
output.writeMessage(4, getChaincodeId());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!results_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, results_);
}
if (!events_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, events_);
}
if (response_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getResponse());
}
if (chaincodeId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getChaincodeId());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction other = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction) obj;
if (!getResults()
.equals(other.getResults())) return false;
if (!getEvents()
.equals(other.getEvents())) return false;
if (hasResponse() != other.hasResponse()) return false;
if (hasResponse()) {
if (!getResponse()
.equals(other.getResponse())) return false;
}
if (hasChaincodeId() != other.hasChaincodeId()) return false;
if (hasChaincodeId()) {
if (!getChaincodeId()
.equals(other.getChaincodeId())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESULTS_FIELD_NUMBER;
hash = (53 * hash) + getResults().hashCode();
hash = (37 * hash) + EVENTS_FIELD_NUMBER;
hash = (53 * hash) + getEvents().hashCode();
if (hasResponse()) {
hash = (37 * hash) + RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getResponse().hashCode();
}
if (hasChaincodeId()) {
hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeId().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction 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.ProposalPackage.ChaincodeAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction 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.ProposalPackage.ChaincodeAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction 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.ProposalPackage.ChaincodeAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction 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.ProposalPackage.ChaincodeAction 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.ProposalPackage.ChaincodeAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeAction contains the actions the events generated by the execution
* of the chaincode.
*
*
* Protobuf type {@code protos.ChaincodeAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeAction)
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.class, org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
results_ = com.google.protobuf.ByteString.EMPTY;
events_ = com.google.protobuf.ByteString.EMPTY;
if (responseBuilder_ == null) {
response_ = null;
} else {
response_ = null;
responseBuilder_ = null;
}
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.internal_static_protos_ChaincodeAction_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction build() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction result = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction(this);
result.results_ = results_;
result.events_ = events_;
if (responseBuilder_ == null) {
result.response_ = response_;
} else {
result.response_ = responseBuilder_.build();
}
if (chaincodeIdBuilder_ == null) {
result.chaincodeId_ = chaincodeId_;
} else {
result.chaincodeId_ = chaincodeIdBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction.getDefaultInstance()) return this;
if (other.getResults() != com.google.protobuf.ByteString.EMPTY) {
setResults(other.getResults());
}
if (other.getEvents() != com.google.protobuf.ByteString.EMPTY) {
setEvents(other.getEvents());
}
if (other.hasResponse()) {
mergeResponse(other.getResponse());
}
if (other.hasChaincodeId()) {
mergeChaincodeId(other.getChaincodeId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString results_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This field contains the read set and the write set produced by the
* chaincode executing this invocation.
*
*
* bytes results = 1;
*/
public com.google.protobuf.ByteString getResults() {
return results_;
}
/**
*
* This field contains the read set and the write set produced by the
* chaincode executing this invocation.
*
*
* bytes results = 1;
*/
public Builder setResults(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
results_ = value;
onChanged();
return this;
}
/**
*
* This field contains the read set and the write set produced by the
* chaincode executing this invocation.
*
*
* bytes results = 1;
*/
public Builder clearResults() {
results_ = getDefaultInstance().getResults();
onChanged();
return this;
}
private com.google.protobuf.ByteString events_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This field contains the events generated by the chaincode executing this
* invocation.
*
*
* bytes events = 2;
*/
public com.google.protobuf.ByteString getEvents() {
return events_;
}
/**
*
* This field contains the events generated by the chaincode executing this
* invocation.
*
*
* bytes events = 2;
*/
public Builder setEvents(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
events_ = value;
onChanged();
return this;
}
/**
*
* This field contains the events generated by the chaincode executing this
* invocation.
*
*
* bytes events = 2;
*/
public Builder clearEvents() {
events_ = getDefaultInstance().getEvents();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response response_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder> responseBuilder_;
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public boolean hasResponse() {
return responseBuilder_ != null || response_ != null;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getResponse() {
if (responseBuilder_ == null) {
return response_ == null ? org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance() : response_;
} else {
return responseBuilder_.getMessage();
}
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public Builder setResponse(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response value) {
if (responseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
response_ = value;
onChanged();
} else {
responseBuilder_.setMessage(value);
}
return this;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public Builder setResponse(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder builderForValue) {
if (responseBuilder_ == null) {
response_ = builderForValue.build();
onChanged();
} else {
responseBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public Builder mergeResponse(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response value) {
if (responseBuilder_ == null) {
if (response_ != null) {
response_ =
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.newBuilder(response_).mergeFrom(value).buildPartial();
} else {
response_ = value;
}
onChanged();
} else {
responseBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public Builder clearResponse() {
if (responseBuilder_ == null) {
response_ = null;
onChanged();
} else {
response_ = null;
responseBuilder_ = null;
}
return this;
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder getResponseBuilder() {
onChanged();
return getResponseFieldBuilder().getBuilder();
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder getResponseOrBuilder() {
if (responseBuilder_ != null) {
return responseBuilder_.getMessageOrBuilder();
} else {
return response_ == null ?
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance() : response_;
}
}
/**
*
* This field contains the result of executing this invocation.
*
*
* .protos.Response response = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder>
getResponseFieldBuilder() {
if (responseBuilder_ == null) {
responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder>(
getResponse(),
getParentForChildren(),
isClean());
response_ = null;
}
return responseBuilder_;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder> chaincodeIdBuilder_;
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public boolean hasChaincodeId() {
return chaincodeIdBuilder_ != null || chaincodeId_ != null;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
if (chaincodeIdBuilder_ == null) {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
} else {
return chaincodeIdBuilder_.getMessage();
}
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public Builder setChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeId_ = value;
onChanged();
} else {
chaincodeIdBuilder_.setMessage(value);
}
return this;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public Builder setChaincodeId(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder builderForValue) {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = builderForValue.build();
onChanged();
} else {
chaincodeIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (chaincodeId_ != null) {
chaincodeId_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial();
} else {
chaincodeId_ = value;
}
onChanged();
} else {
chaincodeIdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public Builder clearChaincodeId() {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
onChanged();
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder getChaincodeIdBuilder() {
onChanged();
return getChaincodeIdFieldBuilder().getBuilder();
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
if (chaincodeIdBuilder_ != null) {
return chaincodeIdBuilder_.getMessageOrBuilder();
} else {
return chaincodeId_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
}
/**
*
* This field contains the ChaincodeID of executing this invocation. Endorser
* will set it with the ChaincodeID called by endorser while simulating proposal.
* Committer will validate the version matching with latest chaincode version.
* Adding ChaincodeID to keep version opens up the possibility of multiple
* ChaincodeAction per transaction.
*
*
* .protos.ChaincodeID chaincode_id = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>
getChaincodeIdFieldBuilder() {
if (chaincodeIdBuilder_ == null) {
chaincodeIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>(
getChaincodeId(),
getParentForChildren(),
isClean());
chaincodeId_ = null;
}
return chaincodeIdBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeAction)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeAction)
private static final org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction();
}
public static org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeAction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_SignedProposal_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_SignedProposal_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Proposal_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Proposal_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeHeaderExtension_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeHeaderExtension_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeProposalPayload_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeProposalPayload_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeAction_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeAction_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\023peer/proposal.proto\022\006protos\032\024peer/chai" +
"ncode.proto\032\034peer/proposal_response.prot" +
"o\";\n\016SignedProposal\022\026\n\016proposal_bytes\030\001 " +
"\001(\014\022\021\n\tsignature\030\002 \001(\014\">\n\010Proposal\022\016\n\006he" +
"ader\030\001 \001(\014\022\017\n\007payload\030\002 \001(\014\022\021\n\textension" +
"\030\003 \001(\014\"^\n\030ChaincodeHeaderExtension\022)\n\014ch" +
"aincode_id\030\002 \001(\0132\023.protos.ChaincodeIDJ\004\010" +
"\001\020\002R\021payload_visbility\"\250\001\n\030ChaincodeProp" +
"osalPayload\022\r\n\005input\030\001 \001(\014\022H\n\014TransientM" +
"ap\030\002 \003(\01322.protos.ChaincodeProposalPaylo" +
"ad.TransientMapEntry\0323\n\021TransientMapEntr" +
"y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\231\001\n\017Ch" +
"aincodeAction\022\017\n\007results\030\001 \001(\014\022\016\n\006events" +
"\030\002 \001(\014\022\"\n\010response\030\003 \001(\0132\020.protos.Respon" +
"se\022)\n\014chaincode_id\030\004 \001(\0132\023.protos.Chainc" +
"odeIDJ\004\010\005\020\006R\020token_operationsBc\n\"org.hyp" +
"erledger.fabric.protos.peerB\017ProposalPac" +
"kageZ,github.com/hyperledger/fabric-prot" +
"os-go/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[] {
org.hyperledger.fabric.protos.peer.Chaincode.getDescriptor(),
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.getDescriptor(),
}, assigner);
internal_static_protos_SignedProposal_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_SignedProposal_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_SignedProposal_descriptor,
new java.lang.String[] { "ProposalBytes", "Signature", });
internal_static_protos_Proposal_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_Proposal_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Proposal_descriptor,
new java.lang.String[] { "Header", "Payload", "Extension", });
internal_static_protos_ChaincodeHeaderExtension_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_ChaincodeHeaderExtension_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeHeaderExtension_descriptor,
new java.lang.String[] { "ChaincodeId", });
internal_static_protos_ChaincodeProposalPayload_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_protos_ChaincodeProposalPayload_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeProposalPayload_descriptor,
new java.lang.String[] { "Input", "TransientMap", });
internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_descriptor =
internal_static_protos_ChaincodeProposalPayload_descriptor.getNestedTypes().get(0);
internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeProposalPayload_TransientMapEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_protos_ChaincodeAction_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_protos_ChaincodeAction_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeAction_descriptor,
new java.lang.String[] { "Results", "Events", "Response", "ChaincodeId", });
org.hyperledger.fabric.protos.peer.Chaincode.getDescriptor();
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}