org.hyperledger.fabric.protos.peer.ProposalResponsePackage 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_response.proto
package org.hyperledger.fabric.protos.peer;
public final class ProposalResponsePackage {
private ProposalResponsePackage() {}
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 ProposalResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ProposalResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1;
*/
int getVersion();
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2;
*/
boolean hasTimestamp();
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2;
*/
com.google.protobuf.Timestamp getTimestamp();
/**
*
* Timestamp is the time that the message
* was created as defined by the sender
*
*
* .google.protobuf.Timestamp timestamp = 2;
*/
com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
boolean hasResponse();
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getResponse();
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder getResponseOrBuilder();
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5;
*/
com.google.protobuf.ByteString getPayload();
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
boolean hasEndorsement();
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement getEndorsement();
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder getEndorsementOrBuilder();
}
/**
*
* 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 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
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();
}
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 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.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 42: {
payload_ = input.readBytes();
break;
}
case 50: {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder subBuilder = null;
if (endorsement_ != null) {
subBuilder = endorsement_.toBuilder();
}
endorsement_ = input.readMessage(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(endorsement_);
endorsement_ = 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.ProposalResponsePackage.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
private int version_;
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1;
*/
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;
*/
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;
*/
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;
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return getTimestamp();
}
public static final int RESPONSE_FIELD_NUMBER = 4;
private org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response response_;
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
public boolean hasResponse() {
return response_ != null;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getResponse() {
return response_ == null ? org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance() : response_;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int ENDORSEMENT_FIELD_NUMBER = 6;
private org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement endorsement_;
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
public boolean hasEndorsement() {
return endorsement_ != null;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement getEndorsement() {
return endorsement_ == null ? org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.getDefaultInstance() : endorsement_;
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder getEndorsementOrBuilder() {
return getEndorsement();
}
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());
}
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());
}
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.ProposalResponsePackage.ProposalResponse)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse other = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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 (!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();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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.ProposalResponsePackage.ProposalResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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.ProposalResponsePackage.ProposalResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.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.ProposalResponsePackage.ProposalResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponse_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse build() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse result = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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();
}
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.ProposalResponsePackage.ProposalResponse) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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());
}
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.ProposalResponsePackage.ProposalResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
*/
public int getVersion() {
return version_;
}
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1;
*/
public Builder setVersion(int value) {
version_ = value;
onChanged();
return this;
}
/**
*
* Version indicates message protocol version
*
*
* int32 version = 1;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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;
*/
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.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_;
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
public boolean hasResponse() {
return responseBuilder_ != null || response_ != null;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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();
}
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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;
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder getResponseBuilder() {
onChanged();
return getResponseFieldBuilder().getBuilder();
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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_;
}
}
/**
*
* A response message indicating whether the
* endorsement of the action was successful
*
*
* .protos.Response response = 4;
*/
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 com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* The payload of response. It is the bytes of ProposalResponsePayload
*
*
* bytes payload = 5;
*/
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;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement endorsement_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder> endorsementBuilder_;
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
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;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement getEndorsement() {
if (endorsementBuilder_ == null) {
return endorsement_ == null ? org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.getDefaultInstance() : endorsement_;
} else {
return endorsementBuilder_.getMessage();
}
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
public Builder setEndorsement(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
*/
public Builder setEndorsement(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
*/
public Builder mergeEndorsement(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement value) {
if (endorsementBuilder_ == null) {
if (endorsement_ != null) {
endorsement_ =
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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;
*/
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;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder getEndorsementBuilder() {
onChanged();
return getEndorsementFieldBuilder().getBuilder();
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder getEndorsementOrBuilder() {
if (endorsementBuilder_ != null) {
return endorsementBuilder_.getMessageOrBuilder();
} else {
return endorsement_ == null ?
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.getDefaultInstance() : endorsement_;
}
}
/**
*
* The endorsement of the proposal, basically
* the endorser's signature over the payload
*
*
* .protos.Endorsement endorsement = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder>
getEndorsementFieldBuilder() {
if (endorsementBuilder_ == null) {
endorsementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder>(
getEndorsement(),
getParentForChildren(),
isClean());
endorsement_ = null;
}
return endorsementBuilder_;
}
@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.ProposalResponsePackage.ProposalResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponse();
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.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.ProposalResponsePackage.ProposalResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Response)
com.google.protobuf.MessageOrBuilder {
/**
*
* A status code that should follow the HTTP status codes.
*
*
* int32 status = 1;
*/
int getStatus();
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
java.lang.String getMessage();
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
com.google.protobuf.ByteString
getMessageBytes();
/**
*
* A payload that can be used to include metadata with this response.
*
*
* bytes payload = 3;
*/
com.google.protobuf.ByteString getPayload();
}
/**
*
* A response with a representation similar to an HTTP response that can
* be used within another message.
*
*
* Protobuf type {@code protos.Response}
*/
public static final class Response extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Response)
ResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use Response.newBuilder() to construct.
private Response(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Response() {
message_ = "";
payload_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Response(
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 8: {
status_ = input.readInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
message_ = s;
break;
}
case 26: {
payload_ = 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.ProposalResponsePackage.internal_static_protos_Response_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder.class);
}
public static final int STATUS_FIELD_NUMBER = 1;
private int status_;
/**
*
* A status code that should follow the HTTP status codes.
*
*
* int32 status = 1;
*/
public int getStatus() {
return status_;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object message_;
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
message_ = s;
return s;
}
}
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public com.google.protobuf.ByteString
getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAYLOAD_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString payload_;
/**
*
* A payload that can be used to include metadata with this response.
*
*
* bytes payload = 3;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
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 (status_ != 0) {
output.writeInt32(1, status_);
}
if (!getMessageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
}
if (!payload_.isEmpty()) {
output.writeBytes(3, payload_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, status_);
}
if (!getMessageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
}
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, payload_);
}
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.ProposalResponsePackage.Response)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response other = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response) obj;
if (getStatus()
!= other.getStatus()) return false;
if (!getMessage()
.equals(other.getMessage())) return false;
if (!getPayload()
.equals(other.getPayload())) 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) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus();
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response 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.ProposalResponsePackage.Response 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 response with a representation similar to an HTTP response that can
* be used within another message.
*
*
* Protobuf type {@code protos.Response}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Response)
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Response_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.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();
status_ = 0;
message_ = "";
payload_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Response_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response build() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response result = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response(this);
result.status_ = status_;
result.message_ = message_;
result.payload_ = payload_;
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.ProposalResponsePackage.Response) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response.getDefaultInstance()) return this;
if (other.getStatus() != 0) {
setStatus(other.getStatus());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
onChanged();
}
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
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.ProposalResponsePackage.Response parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int status_ ;
/**
*
* A status code that should follow the HTTP status codes.
*
*
* int32 status = 1;
*/
public int getStatus() {
return status_;
}
/**
*
* A status code that should follow the HTTP status codes.
*
*
* int32 status = 1;
*/
public Builder setStatus(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* A status code that should follow the HTTP status codes.
*
*
* int32 status = 1;
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
message_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public com.google.protobuf.ByteString
getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public Builder setMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
return this;
}
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public Builder clearMessage() {
message_ = getDefaultInstance().getMessage();
onChanged();
return this;
}
/**
*
* A message associated with the response code.
*
*
* string message = 2;
*/
public Builder setMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
message_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* A payload that can be used to include metadata with this response.
*
*
* bytes payload = 3;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* A payload that can be used to include metadata with this response.
*
*
* bytes payload = 3;
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
*
* A payload that can be used to include metadata with this response.
*
*
* bytes payload = 3;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
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.Response)
}
// @@protoc_insertion_point(class_scope:protos.Response)
private static final org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response();
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Response parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Response(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.ProposalResponsePackage.Response getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProposalResponsePayloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ProposalResponsePayload)
com.google.protobuf.MessageOrBuilder {
/**
*
* Hash of the proposal that triggered this response. The hash is used to
* link a response with its proposal, both for bookeeping purposes on an
* asynchronous system and for security reasons (accountability,
* non-repudiation). The hash usually covers the entire Proposal message
* (byte-by-byte).
*
*
* bytes proposal_hash = 1;
*/
com.google.protobuf.ByteString getProposalHash();
/**
*
* Extension should be unmarshaled to a type-specific message. The type of
* the extension in any proposal response depends on the type of the proposal
* that the client selected when the proposal was initially sent out. In
* particular, this information is stored in the type field of a Header. For
* chaincode, it's a ChaincodeAction message
*
*
* bytes extension = 2;
*/
com.google.protobuf.ByteString getExtension();
}
/**
*
* ProposalResponsePayload is the payload of a proposal response. This message
* is the "bridge" between the client's request and the endorser's action in
* response to that request. Concretely, for chaincodes, it contains a hashed
* representation of the proposal (proposalHash) and a representation of the
* chaincode state changes and events inside the extension field.
*
*
* Protobuf type {@code protos.ProposalResponsePayload}
*/
public static final class ProposalResponsePayload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ProposalResponsePayload)
ProposalResponsePayloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProposalResponsePayload.newBuilder() to construct.
private ProposalResponsePayload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProposalResponsePayload() {
proposalHash_ = 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 ProposalResponsePayload(
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: {
proposalHash_ = input.readBytes();
break;
}
case 18: {
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.ProposalResponsePackage.internal_static_protos_ProposalResponsePayload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponsePayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.Builder.class);
}
public static final int PROPOSAL_HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString proposalHash_;
/**
*
* Hash of the proposal that triggered this response. The hash is used to
* link a response with its proposal, both for bookeeping purposes on an
* asynchronous system and for security reasons (accountability,
* non-repudiation). The hash usually covers the entire Proposal message
* (byte-by-byte).
*
*
* bytes proposal_hash = 1;
*/
public com.google.protobuf.ByteString getProposalHash() {
return proposalHash_;
}
public static final int EXTENSION_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString extension_;
/**
*
* Extension should be unmarshaled to a type-specific message. The type of
* the extension in any proposal response depends on the type of the proposal
* that the client selected when the proposal was initially sent out. In
* particular, this information is stored in the type field of a Header. For
* chaincode, it's a ChaincodeAction message
*
*
* bytes extension = 2;
*/
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 (!proposalHash_.isEmpty()) {
output.writeBytes(1, proposalHash_);
}
if (!extension_.isEmpty()) {
output.writeBytes(2, extension_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!proposalHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, proposalHash_);
}
if (!extension_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, 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.ProposalResponsePackage.ProposalResponsePayload)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload other = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload) obj;
if (!getProposalHash()
.equals(other.getProposalHash())) 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) + PROPOSAL_HASH_FIELD_NUMBER;
hash = (53 * hash) + getProposalHash().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.ProposalResponsePackage.ProposalResponsePayload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload 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.ProposalResponsePackage.ProposalResponsePayload 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;
}
/**
*
* ProposalResponsePayload is the payload of a proposal response. This message
* is the "bridge" between the client's request and the endorser's action in
* response to that request. Concretely, for chaincodes, it contains a hashed
* representation of the proposal (proposalHash) and a representation of the
* chaincode state changes and events inside the extension field.
*
*
* Protobuf type {@code protos.ProposalResponsePayload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ProposalResponsePayload)
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponsePayload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_ProposalResponsePayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.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();
proposalHash_ = 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.ProposalResponsePackage.internal_static_protos_ProposalResponsePayload_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload build() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload result = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload(this);
result.proposalHash_ = proposalHash_;
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.ProposalResponsePackage.ProposalResponsePayload) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload.getDefaultInstance()) return this;
if (other.getProposalHash() != com.google.protobuf.ByteString.EMPTY) {
setProposalHash(other.getProposalHash());
}
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.ProposalResponsePackage.ProposalResponsePayload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString proposalHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Hash of the proposal that triggered this response. The hash is used to
* link a response with its proposal, both for bookeeping purposes on an
* asynchronous system and for security reasons (accountability,
* non-repudiation). The hash usually covers the entire Proposal message
* (byte-by-byte).
*
*
* bytes proposal_hash = 1;
*/
public com.google.protobuf.ByteString getProposalHash() {
return proposalHash_;
}
/**
*
* Hash of the proposal that triggered this response. The hash is used to
* link a response with its proposal, both for bookeeping purposes on an
* asynchronous system and for security reasons (accountability,
* non-repudiation). The hash usually covers the entire Proposal message
* (byte-by-byte).
*
*
* bytes proposal_hash = 1;
*/
public Builder setProposalHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
proposalHash_ = value;
onChanged();
return this;
}
/**
*
* Hash of the proposal that triggered this response. The hash is used to
* link a response with its proposal, both for bookeeping purposes on an
* asynchronous system and for security reasons (accountability,
* non-repudiation). The hash usually covers the entire Proposal message
* (byte-by-byte).
*
*
* bytes proposal_hash = 1;
*/
public Builder clearProposalHash() {
proposalHash_ = getDefaultInstance().getProposalHash();
onChanged();
return this;
}
private com.google.protobuf.ByteString extension_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Extension should be unmarshaled to a type-specific message. The type of
* the extension in any proposal response depends on the type of the proposal
* that the client selected when the proposal was initially sent out. In
* particular, this information is stored in the type field of a Header. For
* chaincode, it's a ChaincodeAction message
*
*
* bytes extension = 2;
*/
public com.google.protobuf.ByteString getExtension() {
return extension_;
}
/**
*
* Extension should be unmarshaled to a type-specific message. The type of
* the extension in any proposal response depends on the type of the proposal
* that the client selected when the proposal was initially sent out. In
* particular, this information is stored in the type field of a Header. For
* chaincode, it's a ChaincodeAction message
*
*
* bytes extension = 2;
*/
public Builder setExtension(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
extension_ = value;
onChanged();
return this;
}
/**
*
* Extension should be unmarshaled to a type-specific message. The type of
* the extension in any proposal response depends on the type of the proposal
* that the client selected when the proposal was initially sent out. In
* particular, this information is stored in the type field of a Header. For
* chaincode, it's a ChaincodeAction message
*
*
* bytes extension = 2;
*/
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.ProposalResponsePayload)
}
// @@protoc_insertion_point(class_scope:protos.ProposalResponsePayload)
private static final org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload();
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.ProposalResponsePayload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProposalResponsePayload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProposalResponsePayload(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.ProposalResponsePackage.ProposalResponsePayload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EndorsementOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Endorsement)
com.google.protobuf.MessageOrBuilder {
/**
*
* Identity of the endorser (e.g. its certificate)
*
*
* bytes endorser = 1;
*/
com.google.protobuf.ByteString getEndorser();
/**
*
* Signature of the payload included in ProposalResponse concatenated with
* the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
*
*
* bytes signature = 2;
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* An endorsement is a signature of an endorser over a proposal response. By
* producing an endorsement message, an endorser implicitly "approves" that
* proposal response and the actions contained therein. When enough
* endorsements have been collected, a transaction can be generated out of a
* set of proposal responses. Note that this message only contains an identity
* and a signature but no signed payload. This is intentional because
* endorsements are supposed to be collected in a transaction, and they are all
* expected to endorse a single proposal response/action (many endorsements
* over a single proposal response)
*
*
* Protobuf type {@code protos.Endorsement}
*/
public static final class Endorsement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Endorsement)
EndorsementOrBuilder {
private static final long serialVersionUID = 0L;
// Use Endorsement.newBuilder() to construct.
private Endorsement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Endorsement() {
endorser_ = 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 Endorsement(
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: {
endorser_ = 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.ProposalResponsePackage.internal_static_protos_Endorsement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Endorsement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder.class);
}
public static final int ENDORSER_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString endorser_;
/**
*
* Identity of the endorser (e.g. its certificate)
*
*
* bytes endorser = 1;
*/
public com.google.protobuf.ByteString getEndorser() {
return endorser_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
*
* Signature of the payload included in ProposalResponse concatenated with
* the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
*
*
* 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 (!endorser_.isEmpty()) {
output.writeBytes(1, endorser_);
}
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 (!endorser_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, endorser_);
}
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.ProposalResponsePackage.Endorsement)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement other = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement) obj;
if (!getEndorser()
.equals(other.getEndorser())) 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) + ENDORSER_FIELD_NUMBER;
hash = (53 * hash) + getEndorser().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.ProposalResponsePackage.Endorsement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement 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.ProposalResponsePackage.Endorsement 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;
}
/**
*
* An endorsement is a signature of an endorser over a proposal response. By
* producing an endorsement message, an endorser implicitly "approves" that
* proposal response and the actions contained therein. When enough
* endorsements have been collected, a transaction can be generated out of a
* set of proposal responses. Note that this message only contains an identity
* and a signature but no signed payload. This is intentional because
* endorsements are supposed to be collected in a transaction, and they are all
* expected to endorse a single proposal response/action (many endorsements
* over a single proposal response)
*
*
* Protobuf type {@code protos.Endorsement}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Endorsement)
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.EndorsementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Endorsement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.internal_static_protos_Endorsement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.class, org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.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();
endorser_ = 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.ProposalResponsePackage.internal_static_protos_Endorsement_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement build() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement buildPartial() {
org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement result = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement(this);
result.endorser_ = endorser_;
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.ProposalResponsePackage.Endorsement) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement other) {
if (other == org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement.getDefaultInstance()) return this;
if (other.getEndorser() != com.google.protobuf.ByteString.EMPTY) {
setEndorser(other.getEndorser());
}
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.ProposalResponsePackage.Endorsement parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString endorser_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Identity of the endorser (e.g. its certificate)
*
*
* bytes endorser = 1;
*/
public com.google.protobuf.ByteString getEndorser() {
return endorser_;
}
/**
*
* Identity of the endorser (e.g. its certificate)
*
*
* bytes endorser = 1;
*/
public Builder setEndorser(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
endorser_ = value;
onChanged();
return this;
}
/**
*
* Identity of the endorser (e.g. its certificate)
*
*
* bytes endorser = 1;
*/
public Builder clearEndorser() {
endorser_ = getDefaultInstance().getEndorser();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Signature of the payload included in ProposalResponse concatenated with
* the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
*
*
* bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
*
* Signature of the payload included in ProposalResponse concatenated with
* the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
*
*
* bytes signature = 2;
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
*
* Signature of the payload included in ProposalResponse concatenated with
* the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
*
*
* 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.Endorsement)
}
// @@protoc_insertion_point(class_scope:protos.Endorsement)
private static final org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement();
}
public static org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Endorsement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Endorsement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Endorsement(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.ProposalResponsePackage.Endorsement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ProposalResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ProposalResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Response_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Response_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ProposalResponsePayload_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ProposalResponsePayload_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Endorsement_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Endorsement_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\034peer/proposal_response.proto\022\006protos\032\037" +
"google/protobuf/timestamp.proto\"\261\001\n\020Prop" +
"osalResponse\022\017\n\007version\030\001 \001(\005\022-\n\ttimesta" +
"mp\030\002 \001(\0132\032.google.protobuf.Timestamp\022\"\n\010" +
"response\030\004 \001(\0132\020.protos.Response\022\017\n\007payl" +
"oad\030\005 \001(\014\022(\n\013endorsement\030\006 \001(\0132\023.protos." +
"Endorsement\"<\n\010Response\022\016\n\006status\030\001 \001(\005\022" +
"\017\n\007message\030\002 \001(\t\022\017\n\007payload\030\003 \001(\014\"C\n\027Pro" +
"posalResponsePayload\022\025\n\rproposal_hash\030\001 " +
"\001(\014\022\021\n\textension\030\002 \001(\014\"2\n\013Endorsement\022\020\n" +
"\010endorser\030\001 \001(\014\022\021\n\tsignature\030\002 \001(\014Bk\n\"or" +
"g.hyperledger.fabric.protos.peerB\027Propos" +
"alResponsePackageZ,github.com/hyperledge" +
"r/fabric-protos-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[] {
com.google.protobuf.TimestampProto.getDescriptor(),
}, assigner);
internal_static_protos_ProposalResponse_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_ProposalResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ProposalResponse_descriptor,
new java.lang.String[] { "Version", "Timestamp", "Response", "Payload", "Endorsement", });
internal_static_protos_Response_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_Response_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Response_descriptor,
new java.lang.String[] { "Status", "Message", "Payload", });
internal_static_protos_ProposalResponsePayload_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_ProposalResponsePayload_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ProposalResponsePayload_descriptor,
new java.lang.String[] { "ProposalHash", "Extension", });
internal_static_protos_Endorsement_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_protos_Endorsement_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Endorsement_descriptor,
new java.lang.String[] { "Endorser", "Signature", });
com.google.protobuf.TimestampProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}