org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: peer/transaction.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.peer;
/**
*
* ChaincodeEndorsedAction carries information about the endorsement of a
* specific proposal
*
*
* Protobuf type {@code protos.ChaincodeEndorsedAction}
*/
public final class ChaincodeEndorsedAction extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeEndorsedAction)
ChaincodeEndorsedActionOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ChaincodeEndorsedAction.class.getName());
}
// Use ChaincodeEndorsedAction.newBuilder() to construct.
private ChaincodeEndorsedAction(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ChaincodeEndorsedAction() {
proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
endorsements_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.TransactionProto.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.TransactionProto.internal_static_protos_ChaincodeEndorsedAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.class, org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.Builder.class);
}
public static final int PROPOSAL_RESPONSE_PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* bytes proposal_response_payload = 1 [json_name = "proposalResponsePayload"];
* @return The proposalResponsePayload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProposalResponsePayload() {
return proposalResponsePayload_;
}
public static final int ENDORSEMENTS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List endorsements_;
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
@java.lang.Override
public java.util.List getEndorsementsList() {
return endorsements_;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>
getEndorsementsOrBuilderList() {
return endorsements_;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
@java.lang.Override
public int getEndorsementsCount() {
return endorsements_.size();
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Endorsement getEndorsements(int index) {
return endorsements_.get(index);
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.EndorsementOrBuilder getEndorsementsOrBuilder(
int index) {
return endorsements_.get(index);
}
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 (!proposalResponsePayload_.isEmpty()) {
output.writeBytes(1, proposalResponsePayload_);
}
for (int i = 0; i < endorsements_.size(); i++) {
output.writeMessage(2, endorsements_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!proposalResponsePayload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, proposalResponsePayload_);
}
for (int i = 0; i < endorsements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, endorsements_.get(i));
}
size += getUnknownFields().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.ChaincodeEndorsedAction)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction other = (org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction) obj;
if (!getProposalResponsePayload()
.equals(other.getProposalResponsePayload())) return false;
if (!getEndorsementsList()
.equals(other.getEndorsementsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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_RESPONSE_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getProposalResponsePayload().hashCode();
if (getEndorsementsCount() > 0) {
hash = (37 * hash) + ENDORSEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getEndorsementsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction 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.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.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.ChaincodeEndorsedAction 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.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ChaincodeEndorsedAction carries information about the endorsement of a
* specific proposal
*
*
* Protobuf type {@code protos.ChaincodeEndorsedAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeEndorsedAction)
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.TransactionProto.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.TransactionProto.internal_static_protos_ChaincodeEndorsedAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.class, org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
if (endorsementsBuilder_ == null) {
endorsements_ = java.util.Collections.emptyList();
} else {
endorsements_ = null;
endorsementsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.TransactionProto.internal_static_protos_ChaincodeEndorsedAction_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction build() {
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction result = new org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction result) {
if (endorsementsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
endorsements_ = java.util.Collections.unmodifiableList(endorsements_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.endorsements_ = endorsements_;
} else {
result.endorsements_ = endorsementsBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.proposalResponsePayload_ = proposalResponsePayload_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction.getDefaultInstance()) return this;
if (other.getProposalResponsePayload() != com.google.protobuf.ByteString.EMPTY) {
setProposalResponsePayload(other.getProposalResponsePayload());
}
if (endorsementsBuilder_ == null) {
if (!other.endorsements_.isEmpty()) {
if (endorsements_.isEmpty()) {
endorsements_ = other.endorsements_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEndorsementsIsMutable();
endorsements_.addAll(other.endorsements_);
}
onChanged();
}
} else {
if (!other.endorsements_.isEmpty()) {
if (endorsementsBuilder_.isEmpty()) {
endorsementsBuilder_.dispose();
endorsementsBuilder_ = null;
endorsements_ = other.endorsements_;
bitField0_ = (bitField0_ & ~0x00000002);
endorsementsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getEndorsementsFieldBuilder() : null;
} else {
endorsementsBuilder_.addAllMessages(other.endorsements_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
proposalResponsePayload_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
org.hyperledger.fabric.protos.peer.Endorsement m =
input.readMessage(
org.hyperledger.fabric.protos.peer.Endorsement.parser(),
extensionRegistry);
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.add(m);
} else {
endorsementsBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString proposalResponsePayload_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* bytes proposal_response_payload = 1 [json_name = "proposalResponsePayload"];
* @return The proposalResponsePayload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProposalResponsePayload() {
return proposalResponsePayload_;
}
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* bytes proposal_response_payload = 1 [json_name = "proposalResponsePayload"];
* @param value The proposalResponsePayload to set.
* @return This builder for chaining.
*/
public Builder setProposalResponsePayload(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
proposalResponsePayload_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* This is the bytes of the ProposalResponsePayload message signed by the
* endorsers. Recall that for the CHAINCODE type, the
* ProposalResponsePayload's extenstion field carries a ChaincodeAction
*
*
* bytes proposal_response_payload = 1 [json_name = "proposalResponsePayload"];
* @return This builder for chaining.
*/
public Builder clearProposalResponsePayload() {
bitField0_ = (bitField0_ & ~0x00000001);
proposalResponsePayload_ = getDefaultInstance().getProposalResponsePayload();
onChanged();
return this;
}
private java.util.List endorsements_ =
java.util.Collections.emptyList();
private void ensureEndorsementsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
endorsements_ = new java.util.ArrayList(endorsements_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder> endorsementsBuilder_;
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public java.util.List getEndorsementsList() {
if (endorsementsBuilder_ == null) {
return java.util.Collections.unmodifiableList(endorsements_);
} else {
return endorsementsBuilder_.getMessageList();
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public int getEndorsementsCount() {
if (endorsementsBuilder_ == null) {
return endorsements_.size();
} else {
return endorsementsBuilder_.getCount();
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public org.hyperledger.fabric.protos.peer.Endorsement getEndorsements(int index) {
if (endorsementsBuilder_ == null) {
return endorsements_.get(index);
} else {
return endorsementsBuilder_.getMessage(index);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder setEndorsements(
int index, org.hyperledger.fabric.protos.peer.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.set(index, value);
onChanged();
} else {
endorsementsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder setEndorsements(
int index, org.hyperledger.fabric.protos.peer.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.set(index, builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder addEndorsements(org.hyperledger.fabric.protos.peer.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.add(value);
onChanged();
} else {
endorsementsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder addEndorsements(
int index, org.hyperledger.fabric.protos.peer.Endorsement value) {
if (endorsementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndorsementsIsMutable();
endorsements_.add(index, value);
onChanged();
} else {
endorsementsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder addEndorsements(
org.hyperledger.fabric.protos.peer.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.add(builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder addEndorsements(
int index, org.hyperledger.fabric.protos.peer.Endorsement.Builder builderForValue) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.add(index, builderForValue.build());
onChanged();
} else {
endorsementsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder addAllEndorsements(
java.lang.Iterable extends org.hyperledger.fabric.protos.peer.Endorsement> values) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, endorsements_);
onChanged();
} else {
endorsementsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder clearEndorsements() {
if (endorsementsBuilder_ == null) {
endorsements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
endorsementsBuilder_.clear();
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public Builder removeEndorsements(int index) {
if (endorsementsBuilder_ == null) {
ensureEndorsementsIsMutable();
endorsements_.remove(index);
onChanged();
} else {
endorsementsBuilder_.remove(index);
}
return this;
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public org.hyperledger.fabric.protos.peer.Endorsement.Builder getEndorsementsBuilder(
int index) {
return getEndorsementsFieldBuilder().getBuilder(index);
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public org.hyperledger.fabric.protos.peer.EndorsementOrBuilder getEndorsementsOrBuilder(
int index) {
if (endorsementsBuilder_ == null) {
return endorsements_.get(index); } else {
return endorsementsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public java.util.List extends org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>
getEndorsementsOrBuilderList() {
if (endorsementsBuilder_ != null) {
return endorsementsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(endorsements_);
}
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public org.hyperledger.fabric.protos.peer.Endorsement.Builder addEndorsementsBuilder() {
return getEndorsementsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.Endorsement.getDefaultInstance());
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public org.hyperledger.fabric.protos.peer.Endorsement.Builder addEndorsementsBuilder(
int index) {
return getEndorsementsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.Endorsement.getDefaultInstance());
}
/**
*
* The endorsement of the proposal, basically the endorser's signature over
* proposalResponsePayload
*
*
* repeated .protos.Endorsement endorsements = 2 [json_name = "endorsements"];
*/
public java.util.List
getEndorsementsBuilderList() {
return getEndorsementsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>
getEndorsementsFieldBuilder() {
if (endorsementsBuilder_ == null) {
endorsementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.Endorsement, org.hyperledger.fabric.protos.peer.Endorsement.Builder, org.hyperledger.fabric.protos.peer.EndorsementOrBuilder>(
endorsements_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
endorsements_ = null;
}
return endorsementsBuilder_;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeEndorsedAction)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeEndorsedAction)
private static final org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeEndorsedAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeEndorsedAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.ChaincodeEndorsedAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy