org.hyperledger.fabric.protos.peer.ProposalResponse Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: peer/proposal_response.proto
package org.hyperledger.fabric.protos.peer;
/**
*
* A ProposalResponse is returned from an endorser to the proposal submitter.
* The idea is that this message contains the endorser's response to the
* request of a client to perform an action over a chaincode (or more
* generically on the ledger); the response might be success/error (conveyed in
* the Response field) together with a description of the action and a
* signature over it by that endorser. If a sufficient number of distinct
* endorsers agree on the same action and produce signature to that effect, a
* transaction can be generated and sent for ordering.
*
*
* Protobuf type {@code protos.ProposalResponse}
*/
public final class ProposalResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ProposalResponse)
ProposalResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProposalResponse.newBuilder() to construct.
private ProposalResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ProposalResponse() {
payload_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ProposalResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ProposalResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
version_ = input.readInt32();
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 34: {
org.hyperledger.fabric.protos.peer.Response.Builder subBuilder = null;
if (response_ != null) {
subBuilder = response_.toBuilder();
}
response_ = input.readMessage(org.hyperledger.fabric.protos.peer.Response.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(response_);
response_ = subBuilder.buildPartial();
}
break;
}
case 42: {
payload_ = input.readBytes();
break;
}
case 50: {
org.hyperledger.fabric.protos.peer.Endorsement.Builder subBuilder = null;
if (endorsement_ != null) {
subBuilder = endorsement_.toBuilder();
}
endorsement_ = input.readMessage(org.hyperledger.fabric.protos.peer.Endorsement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(endorsement_);
endorsement_ = subBuilder.buildPartial();
}
break;
}
case 58: {
org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder subBuilder = null;
if (interest_ != null) {
subBuilder = interest_.toBuilder();
}
interest_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeInterest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(interest_);
interest_ = 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.ProposalResponseProto.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponseProto.internal_static_protos_ProposalResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponse.class, org.hyperledger.fabric.protos.peer.ProposalResponse.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
private int version_;
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1 [json_name = "version"];
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp timestamp_;
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return The timestamp.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return getTimestamp();
}
public static final int RESPONSE_FIELD_NUMBER = 4;
private org.hyperledger.fabric.protos.peer.Response response_;
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
* @return Whether the response field is set.
*/
@java.lang.Override
public boolean hasResponse() {
return response_ != null;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
* @return The response.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Response getResponse() {
return response_ == null ? org.hyperledger.fabric.protos.peer.Response.getDefaultInstance() : response_;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ResponseOrBuilder getResponseOrBuilder() {
return getResponse();
}
public static final int PAYLOAD_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString payload_;
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5 [json_name = "payload"];
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int ENDORSEMENT_FIELD_NUMBER = 6;
private org.hyperledger.fabric.protos.peer.Endorsement endorsement_;
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
* @return Whether the endorsement field is set.
*/
@java.lang.Override
public boolean hasEndorsement() {
return endorsement_ != null;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
* @return The endorsement.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Endorsement getEndorsement() {
return endorsement_ == null ? org.hyperledger.fabric.protos.peer.Endorsement.getDefaultInstance() : endorsement_;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.EndorsementOrBuilder getEndorsementOrBuilder() {
return getEndorsement();
}
public static final int INTEREST_FIELD_NUMBER = 7;
private org.hyperledger.fabric.protos.peer.ChaincodeInterest interest_;
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
* @return Whether the interest field is set.
*/
@java.lang.Override
public boolean hasInterest() {
return interest_ != null;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
* @return The interest.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeInterest getInterest() {
return interest_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeInterest.getDefaultInstance() : interest_;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeInterestOrBuilder getInterestOrBuilder() {
return getInterest();
}
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 (version_ != 0) {
output.writeInt32(1, version_);
}
if (timestamp_ != null) {
output.writeMessage(2, getTimestamp());
}
if (response_ != null) {
output.writeMessage(4, getResponse());
}
if (!payload_.isEmpty()) {
output.writeBytes(5, payload_);
}
if (endorsement_ != null) {
output.writeMessage(6, getEndorsement());
}
if (interest_ != null) {
output.writeMessage(7, getInterest());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (version_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, version_);
}
if (timestamp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTimestamp());
}
if (response_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getResponse());
}
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, payload_);
}
if (endorsement_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getEndorsement());
}
if (interest_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getInterest());
}
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.ProposalResponse)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalResponse other = (org.hyperledger.fabric.protos.peer.ProposalResponse) obj;
if (getVersion()
!= other.getVersion()) return false;
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (!getTimestamp()
.equals(other.getTimestamp())) return false;
}
if (hasResponse() != other.hasResponse()) return false;
if (hasResponse()) {
if (!getResponse()
.equals(other.getResponse())) return false;
}
if (!getPayload()
.equals(other.getPayload())) return false;
if (hasEndorsement() != other.hasEndorsement()) return false;
if (hasEndorsement()) {
if (!getEndorsement()
.equals(other.getEndorsement())) return false;
}
if (hasInterest() != other.hasInterest()) return false;
if (hasInterest()) {
if (!getInterest()
.equals(other.getInterest())) 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) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion();
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
if (hasResponse()) {
hash = (37 * hash) + RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getResponse().hashCode();
}
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
if (hasEndorsement()) {
hash = (37 * hash) + ENDORSEMENT_FIELD_NUMBER;
hash = (53 * hash) + getEndorsement().hashCode();
}
if (hasInterest()) {
hash = (37 * hash) + INTEREST_FIELD_NUMBER;
hash = (53 * hash) + getInterest().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse 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.ProposalResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse 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.ProposalResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse 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.ProposalResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse 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.ProposalResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse 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.ProposalResponse 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.ProposalResponse 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.ProposalResponse 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 ProposalResponse is returned from an endorser to the proposal submitter.
* The idea is that this message contains the endorser's response to the
* request of a client to perform an action over a chaincode (or more
* generically on the ledger); the response might be success/error (conveyed in
* the Response field) together with a description of the action and a
* signature over it by that endorser. If a sufficient number of distinct
* endorsers agree on the same action and produce signature to that effect, a
* transaction can be generated and sent for ordering.
*
*
* Protobuf type {@code protos.ProposalResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ProposalResponse)
org.hyperledger.fabric.protos.peer.ProposalResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalResponseProto.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponseProto.internal_static_protos_ProposalResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponse.class, org.hyperledger.fabric.protos.peer.ProposalResponse.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalResponse.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();
version_ = 0;
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
if (responseBuilder_ == null) {
response_ = null;
} else {
response_ = null;
responseBuilder_ = null;
}
payload_ = com.google.protobuf.ByteString.EMPTY;
if (endorsementBuilder_ == null) {
endorsement_ = null;
} else {
endorsement_ = null;
endorsementBuilder_ = null;
}
if (interestBuilder_ == null) {
interest_ = null;
} else {
interest_ = null;
interestBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponseProto.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponse getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponse.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponse build() {
org.hyperledger.fabric.protos.peer.ProposalResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponse buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalResponse result = new org.hyperledger.fabric.protos.peer.ProposalResponse(this);
result.version_ = version_;
if (timestampBuilder_ == null) {
result.timestamp_ = timestamp_;
} else {
result.timestamp_ = timestampBuilder_.build();
}
if (responseBuilder_ == null) {
result.response_ = response_;
} else {
result.response_ = responseBuilder_.build();
}
result.payload_ = payload_;
if (endorsementBuilder_ == null) {
result.endorsement_ = endorsement_;
} else {
result.endorsement_ = endorsementBuilder_.build();
}
if (interestBuilder_ == null) {
result.interest_ = interest_;
} else {
result.interest_ = interestBuilder_.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.ProposalResponse) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalResponse other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalResponse.getDefaultInstance()) return this;
if (other.getVersion() != 0) {
setVersion(other.getVersion());
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
if (other.hasResponse()) {
mergeResponse(other.getResponse());
}
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
if (other.hasEndorsement()) {
mergeEndorsement(other.getEndorsement());
}
if (other.hasInterest()) {
mergeInterest(other.getInterest());
}
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.ProposalResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int version_ ;
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1 [json_name = "version"];
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1 [json_name = "version"];
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(int value) {
version_ = value;
onChanged();
return this;
}
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1 [json_name = "version"];
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp timestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return timestampBuilder_ != null || timestamp_ != null;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
* @return The timestamp.
*/
public com.google.protobuf.Timestamp getTimestamp() {
if (timestampBuilder_ == null) {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
} else {
return timestampBuilder_.getMessage();
}
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder setTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestamp_ = value;
onChanged();
} else {
timestampBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder setTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampBuilder_ == null) {
timestamp_ = builderForValue.build();
onChanged();
} else {
timestampBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (timestamp_ != null) {
timestamp_ =
com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
} else {
timestamp_ = value;
}
onChanged();
} else {
timestampBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public Builder clearTimestamp() {
if (timestampBuilder_ == null) {
timestamp_ = null;
onChanged();
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
return this;
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
onChanged();
return getTimestampFieldBuilder().getBuilder();
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
if (timestampBuilder_ != null) {
return timestampBuilder_.getMessageOrBuilder();
} else {
return timestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
}
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2 [json_name = "timestamp"];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimestampFieldBuilder() {
if (timestampBuilder_ == null) {
timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTimestamp(),
getParentForChildren(),
isClean());
timestamp_ = null;
}
return timestampBuilder_;
}
private org.hyperledger.fabric.protos.peer.Response response_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Response, org.hyperledger.fabric.protos.peer.Response.Builder, org.hyperledger.fabric.protos.peer.ResponseOrBuilder> responseBuilder_;
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
* @return Whether the response field is set.
*/
public boolean hasResponse() {
return responseBuilder_ != null || response_ != null;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
* @return The response.
*/
public org.hyperledger.fabric.protos.peer.Response getResponse() {
if (responseBuilder_ == null) {
return response_ == null ? org.hyperledger.fabric.protos.peer.Response.getDefaultInstance() : response_;
} else {
return responseBuilder_.getMessage();
}
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public Builder setResponse(org.hyperledger.fabric.protos.peer.Response value) {
if (responseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
response_ = value;
onChanged();
} else {
responseBuilder_.setMessage(value);
}
return this;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public Builder setResponse(
org.hyperledger.fabric.protos.peer.Response.Builder builderForValue) {
if (responseBuilder_ == null) {
response_ = builderForValue.build();
onChanged();
} else {
responseBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public Builder mergeResponse(org.hyperledger.fabric.protos.peer.Response value) {
if (responseBuilder_ == null) {
if (response_ != null) {
response_ =
org.hyperledger.fabric.protos.peer.Response.newBuilder(response_).mergeFrom(value).buildPartial();
} else {
response_ = value;
}
onChanged();
} else {
responseBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public Builder clearResponse() {
if (responseBuilder_ == null) {
response_ = null;
onChanged();
} else {
response_ = null;
responseBuilder_ = null;
}
return this;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public org.hyperledger.fabric.protos.peer.Response.Builder getResponseBuilder() {
onChanged();
return getResponseFieldBuilder().getBuilder();
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
public org.hyperledger.fabric.protos.peer.ResponseOrBuilder getResponseOrBuilder() {
if (responseBuilder_ != null) {
return responseBuilder_.getMessageOrBuilder();
} else {
return response_ == null ?
org.hyperledger.fabric.protos.peer.Response.getDefaultInstance() : response_;
}
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4 [json_name = "response"];
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Response, org.hyperledger.fabric.protos.peer.Response.Builder, org.hyperledger.fabric.protos.peer.ResponseOrBuilder>
getResponseFieldBuilder() {
if (responseBuilder_ == null) {
responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Response, org.hyperledger.fabric.protos.peer.Response.Builder, org.hyperledger.fabric.protos.peer.ResponseOrBuilder>(
getResponse(),
getParentForChildren(),
isClean());
response_ = null;
}
return responseBuilder_;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5 [json_name = "payload"];
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5 [json_name = "payload"];
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5 [json_name = "payload"];
* @return This builder for chaining.
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.Endorsement endorsement_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder> endorsementBuilder_;
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
* @return Whether the endorsement field is set.
*/
public boolean hasEndorsement() {
return endorsementBuilder_ != null || endorsement_ != null;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
* @return The endorsement.
*/
public org.hyperledger.fabric.protos.peer.Endorsement getEndorsement() {
if (endorsementBuilder_ == null) {
return endorsement_ == null ? org.hyperledger.fabric.protos.peer.Endorsement.getDefaultInstance() : endorsement_;
} else {
return endorsementBuilder_.getMessage();
}
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public Builder setEndorsement(org.hyperledger.fabric.protos.peer.Endorsement value) {
if (endorsementBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
endorsement_ = value;
onChanged();
} else {
endorsementBuilder_.setMessage(value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public Builder setEndorsement(
org.hyperledger.fabric.protos.peer.Endorsement.Builder builderForValue) {
if (endorsementBuilder_ == null) {
endorsement_ = builderForValue.build();
onChanged();
} else {
endorsementBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public Builder mergeEndorsement(org.hyperledger.fabric.protos.peer.Endorsement value) {
if (endorsementBuilder_ == null) {
if (endorsement_ != null) {
endorsement_ =
org.hyperledger.fabric.protos.peer.Endorsement.newBuilder(endorsement_).mergeFrom(value).buildPartial();
} else {
endorsement_ = value;
}
onChanged();
} else {
endorsementBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public Builder clearEndorsement() {
if (endorsementBuilder_ == null) {
endorsement_ = null;
onChanged();
} else {
endorsement_ = null;
endorsementBuilder_ = null;
}
return this;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public org.hyperledger.fabric.protos.peer.Endorsement.Builder getEndorsementBuilder() {
onChanged();
return getEndorsementFieldBuilder().getBuilder();
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
public org.hyperledger.fabric.protos.peer.EndorsementOrBuilder getEndorsementOrBuilder() {
if (endorsementBuilder_ != null) {
return endorsementBuilder_.getMessageOrBuilder();
} else {
return endorsement_ == null ?
org.hyperledger.fabric.protos.peer.Endorsement.getDefaultInstance() : endorsement_;
}
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6 [json_name = "endorsement"];
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>
getEndorsementFieldBuilder() {
if (endorsementBuilder_ == null) {
endorsementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>(
getEndorsement(),
getParentForChildren(),
isClean());
endorsement_ = null;
}
return endorsementBuilder_;
}
private org.hyperledger.fabric.protos.peer.ChaincodeInterest interest_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeInterest, org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInterestOrBuilder> interestBuilder_;
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
* @return Whether the interest field is set.
*/
public boolean hasInterest() {
return interestBuilder_ != null || interest_ != null;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
* @return The interest.
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInterest getInterest() {
if (interestBuilder_ == null) {
return interest_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeInterest.getDefaultInstance() : interest_;
} else {
return interestBuilder_.getMessage();
}
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public Builder setInterest(org.hyperledger.fabric.protos.peer.ChaincodeInterest value) {
if (interestBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
interest_ = value;
onChanged();
} else {
interestBuilder_.setMessage(value);
}
return this;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public Builder setInterest(
org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder builderForValue) {
if (interestBuilder_ == null) {
interest_ = builderForValue.build();
onChanged();
} else {
interestBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public Builder mergeInterest(org.hyperledger.fabric.protos.peer.ChaincodeInterest value) {
if (interestBuilder_ == null) {
if (interest_ != null) {
interest_ =
org.hyperledger.fabric.protos.peer.ChaincodeInterest.newBuilder(interest_).mergeFrom(value).buildPartial();
} else {
interest_ = value;
}
onChanged();
} else {
interestBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public Builder clearInterest() {
if (interestBuilder_ == null) {
interest_ = null;
onChanged();
} else {
interest_ = null;
interestBuilder_ = null;
}
return this;
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder getInterestBuilder() {
onChanged();
return getInterestFieldBuilder().getBuilder();
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInterestOrBuilder getInterestOrBuilder() {
if (interestBuilder_ != null) {
return interestBuilder_.getMessageOrBuilder();
} else {
return interest_ == null ?
org.hyperledger.fabric.protos.peer.ChaincodeInterest.getDefaultInstance() : interest_;
}
}
/**
*
* The chaincode interest derived from simulating the proposal.
*
*
* .protos.ChaincodeInterest interest = 7 [json_name = "interest"];
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeInterest, org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInterestOrBuilder>
getInterestFieldBuilder() {
if (interestBuilder_ == null) {
interestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ChaincodeInterest, org.hyperledger.fabric.protos.peer.ChaincodeInterest.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInterestOrBuilder>(
getInterest(),
getParentForChildren(),
isClean());
interest_ = null;
}
return interestBuilder_;
}
@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.ProposalResponse)
}
// @@protoc_insertion_point(class_scope:protos.ProposalResponse)
private static final org.hyperledger.fabric.protos.peer.ProposalResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalResponse();
}
public static org.hyperledger.fabric.protos.peer.ProposalResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProposalResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProposalResponse(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.ProposalResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}