All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.gateway.EndorseRequest Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: gateway/gateway.proto

package org.hyperledger.fabric.protos.gateway;

/**
 * 
 * EndorseRequest contains the details required to obtain sufficient endorsements for a
 * transaction to be committed to the ledger.
 * 
* * Protobuf type {@code gateway.EndorseRequest} */ public final class EndorseRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:gateway.EndorseRequest) EndorseRequestOrBuilder { private static final long serialVersionUID = 0L; // Use EndorseRequest.newBuilder() to construct. private EndorseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private EndorseRequest() { transactionId_ = ""; channelId_ = ""; endorsingOrganizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new EndorseRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EndorseRequest( 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: { java.lang.String s = input.readStringRequireUtf8(); transactionId_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); channelId_ = s; break; } case 26: { org.hyperledger.fabric.protos.peer.SignedProposal.Builder subBuilder = null; if (proposedTransaction_ != null) { subBuilder = proposedTransaction_.toBuilder(); } proposedTransaction_ = input.readMessage(org.hyperledger.fabric.protos.peer.SignedProposal.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(proposedTransaction_); proposedTransaction_ = subBuilder.buildPartial(); } break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { endorsingOrganizations_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } endorsingOrganizations_.add(s); 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { endorsingOrganizations_ = endorsingOrganizations_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.gateway.GatewayProto.internal_static_gateway_EndorseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.gateway.GatewayProto.internal_static_gateway_EndorseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.gateway.EndorseRequest.class, org.hyperledger.fabric.protos.gateway.EndorseRequest.Builder.class); } public static final int TRANSACTION_ID_FIELD_NUMBER = 1; private volatile java.lang.Object transactionId_; /** *
   * The unique identifier for the transaction.
   * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @return The transactionId. */ @java.lang.Override public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; 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(); transactionId_ = s; return s; } } /** *
   * The unique identifier for the transaction.
   * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @return The bytes for transactionId. */ @java.lang.Override public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); transactionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CHANNEL_ID_FIELD_NUMBER = 2; private volatile java.lang.Object channelId_; /** *
   * Identifier of the channel this request is bound for.
   * 
* * string channel_id = 2 [json_name = "channelId"]; * @return The channelId. */ @java.lang.Override public java.lang.String getChannelId() { java.lang.Object ref = channelId_; 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(); channelId_ = s; return s; } } /** *
   * Identifier of the channel this request is bound for.
   * 
* * string channel_id = 2 [json_name = "channelId"]; * @return The bytes for channelId. */ @java.lang.Override public com.google.protobuf.ByteString getChannelIdBytes() { java.lang.Object ref = channelId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); channelId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PROPOSED_TRANSACTION_FIELD_NUMBER = 3; private org.hyperledger.fabric.protos.peer.SignedProposal proposedTransaction_; /** *
   * The signed proposal ready for endorsement.
   * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; * @return Whether the proposedTransaction field is set. */ @java.lang.Override public boolean hasProposedTransaction() { return proposedTransaction_ != null; } /** *
   * The signed proposal ready for endorsement.
   * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; * @return The proposedTransaction. */ @java.lang.Override public org.hyperledger.fabric.protos.peer.SignedProposal getProposedTransaction() { return proposedTransaction_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposedTransaction_; } /** *
   * The signed proposal ready for endorsement.
   * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ @java.lang.Override public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposedTransactionOrBuilder() { return getProposedTransaction(); } public static final int ENDORSING_ORGANIZATIONS_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList endorsingOrganizations_; /** *
   * If targeting the peers of specific organizations (e.g. for private data scenarios),
   * the list of organizations' MSPIDs should be supplied here.
   * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @return A list containing the endorsingOrganizations. */ public com.google.protobuf.ProtocolStringList getEndorsingOrganizationsList() { return endorsingOrganizations_; } /** *
   * If targeting the peers of specific organizations (e.g. for private data scenarios),
   * the list of organizations' MSPIDs should be supplied here.
   * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @return The count of endorsingOrganizations. */ public int getEndorsingOrganizationsCount() { return endorsingOrganizations_.size(); } /** *
   * If targeting the peers of specific organizations (e.g. for private data scenarios),
   * the list of organizations' MSPIDs should be supplied here.
   * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param index The index of the element to return. * @return The endorsingOrganizations at the given index. */ public java.lang.String getEndorsingOrganizations(int index) { return endorsingOrganizations_.get(index); } /** *
   * If targeting the peers of specific organizations (e.g. for private data scenarios),
   * the list of organizations' MSPIDs should be supplied here.
   * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param index The index of the value to return. * @return The bytes of the endorsingOrganizations at the given index. */ public com.google.protobuf.ByteString getEndorsingOrganizationsBytes(int index) { return endorsingOrganizations_.getByteString(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transactionId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, channelId_); } if (proposedTransaction_ != null) { output.writeMessage(3, getProposedTransaction()); } for (int i = 0; i < endorsingOrganizations_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endorsingOrganizations_.getRaw(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transactionId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, channelId_); } if (proposedTransaction_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getProposedTransaction()); } { int dataSize = 0; for (int i = 0; i < endorsingOrganizations_.size(); i++) { dataSize += computeStringSizeNoTag(endorsingOrganizations_.getRaw(i)); } size += dataSize; size += 1 * getEndorsingOrganizationsList().size(); } 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.gateway.EndorseRequest)) { return super.equals(obj); } org.hyperledger.fabric.protos.gateway.EndorseRequest other = (org.hyperledger.fabric.protos.gateway.EndorseRequest) obj; if (!getTransactionId() .equals(other.getTransactionId())) return false; if (!getChannelId() .equals(other.getChannelId())) return false; if (hasProposedTransaction() != other.hasProposedTransaction()) return false; if (hasProposedTransaction()) { if (!getProposedTransaction() .equals(other.getProposedTransaction())) return false; } if (!getEndorsingOrganizationsList() .equals(other.getEndorsingOrganizationsList())) 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) + TRANSACTION_ID_FIELD_NUMBER; hash = (53 * hash) + getTransactionId().hashCode(); hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; hash = (53 * hash) + getChannelId().hashCode(); if (hasProposedTransaction()) { hash = (37 * hash) + PROPOSED_TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getProposedTransaction().hashCode(); } if (getEndorsingOrganizationsCount() > 0) { hash = (37 * hash) + ENDORSING_ORGANIZATIONS_FIELD_NUMBER; hash = (53 * hash) + getEndorsingOrganizationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.gateway.EndorseRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest 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.gateway.EndorseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest 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.gateway.EndorseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest 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.gateway.EndorseRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest 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.gateway.EndorseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest 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.gateway.EndorseRequest 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; } /** *
   * EndorseRequest contains the details required to obtain sufficient endorsements for a
   * transaction to be committed to the ledger.
   * 
* * Protobuf type {@code gateway.EndorseRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:gateway.EndorseRequest) org.hyperledger.fabric.protos.gateway.EndorseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.gateway.GatewayProto.internal_static_gateway_EndorseRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.gateway.GatewayProto.internal_static_gateway_EndorseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.gateway.EndorseRequest.class, org.hyperledger.fabric.protos.gateway.EndorseRequest.Builder.class); } // Construct using org.hyperledger.fabric.protos.gateway.EndorseRequest.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(); transactionId_ = ""; channelId_ = ""; if (proposedTransactionBuilder_ == null) { proposedTransaction_ = null; } else { proposedTransaction_ = null; proposedTransactionBuilder_ = null; } endorsingOrganizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.gateway.GatewayProto.internal_static_gateway_EndorseRequest_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.gateway.EndorseRequest getDefaultInstanceForType() { return org.hyperledger.fabric.protos.gateway.EndorseRequest.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.gateway.EndorseRequest build() { org.hyperledger.fabric.protos.gateway.EndorseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.gateway.EndorseRequest buildPartial() { org.hyperledger.fabric.protos.gateway.EndorseRequest result = new org.hyperledger.fabric.protos.gateway.EndorseRequest(this); int from_bitField0_ = bitField0_; result.transactionId_ = transactionId_; result.channelId_ = channelId_; if (proposedTransactionBuilder_ == null) { result.proposedTransaction_ = proposedTransaction_; } else { result.proposedTransaction_ = proposedTransactionBuilder_.build(); } if (((bitField0_ & 0x00000001) != 0)) { endorsingOrganizations_ = endorsingOrganizations_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.endorsingOrganizations_ = endorsingOrganizations_; 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.gateway.EndorseRequest) { return mergeFrom((org.hyperledger.fabric.protos.gateway.EndorseRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.gateway.EndorseRequest other) { if (other == org.hyperledger.fabric.protos.gateway.EndorseRequest.getDefaultInstance()) return this; if (!other.getTransactionId().isEmpty()) { transactionId_ = other.transactionId_; onChanged(); } if (!other.getChannelId().isEmpty()) { channelId_ = other.channelId_; onChanged(); } if (other.hasProposedTransaction()) { mergeProposedTransaction(other.getProposedTransaction()); } if (!other.endorsingOrganizations_.isEmpty()) { if (endorsingOrganizations_.isEmpty()) { endorsingOrganizations_ = other.endorsingOrganizations_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureEndorsingOrganizationsIsMutable(); endorsingOrganizations_.addAll(other.endorsingOrganizations_); } onChanged(); } 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.gateway.EndorseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.gateway.EndorseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object transactionId_ = ""; /** *
     * The unique identifier for the transaction.
     * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @return The transactionId. */ public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); transactionId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The unique identifier for the transaction.
     * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @return The bytes for transactionId. */ public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); transactionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The unique identifier for the transaction.
     * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @param value The transactionId to set. * @return This builder for chaining. */ public Builder setTransactionId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } transactionId_ = value; onChanged(); return this; } /** *
     * The unique identifier for the transaction.
     * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @return This builder for chaining. */ public Builder clearTransactionId() { transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } /** *
     * The unique identifier for the transaction.
     * 
* * string transaction_id = 1 [json_name = "transactionId"]; * @param value The bytes for transactionId to set. * @return This builder for chaining. */ public Builder setTransactionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); transactionId_ = value; onChanged(); return this; } private java.lang.Object channelId_ = ""; /** *
     * Identifier of the channel this request is bound for.
     * 
* * string channel_id = 2 [json_name = "channelId"]; * @return The channelId. */ public java.lang.String getChannelId() { java.lang.Object ref = channelId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); channelId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Identifier of the channel this request is bound for.
     * 
* * string channel_id = 2 [json_name = "channelId"]; * @return The bytes for channelId. */ public com.google.protobuf.ByteString getChannelIdBytes() { java.lang.Object ref = channelId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); channelId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Identifier of the channel this request is bound for.
     * 
* * string channel_id = 2 [json_name = "channelId"]; * @param value The channelId to set. * @return This builder for chaining. */ public Builder setChannelId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } channelId_ = value; onChanged(); return this; } /** *
     * Identifier of the channel this request is bound for.
     * 
* * string channel_id = 2 [json_name = "channelId"]; * @return This builder for chaining. */ public Builder clearChannelId() { channelId_ = getDefaultInstance().getChannelId(); onChanged(); return this; } /** *
     * Identifier of the channel this request is bound for.
     * 
* * string channel_id = 2 [json_name = "channelId"]; * @param value The bytes for channelId to set. * @return This builder for chaining. */ public Builder setChannelIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); channelId_ = value; onChanged(); return this; } private org.hyperledger.fabric.protos.peer.SignedProposal proposedTransaction_; private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder> proposedTransactionBuilder_; /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; * @return Whether the proposedTransaction field is set. */ public boolean hasProposedTransaction() { return proposedTransactionBuilder_ != null || proposedTransaction_ != null; } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; * @return The proposedTransaction. */ public org.hyperledger.fabric.protos.peer.SignedProposal getProposedTransaction() { if (proposedTransactionBuilder_ == null) { return proposedTransaction_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposedTransaction_; } else { return proposedTransactionBuilder_.getMessage(); } } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public Builder setProposedTransaction(org.hyperledger.fabric.protos.peer.SignedProposal value) { if (proposedTransactionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } proposedTransaction_ = value; onChanged(); } else { proposedTransactionBuilder_.setMessage(value); } return this; } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public Builder setProposedTransaction( org.hyperledger.fabric.protos.peer.SignedProposal.Builder builderForValue) { if (proposedTransactionBuilder_ == null) { proposedTransaction_ = builderForValue.build(); onChanged(); } else { proposedTransactionBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public Builder mergeProposedTransaction(org.hyperledger.fabric.protos.peer.SignedProposal value) { if (proposedTransactionBuilder_ == null) { if (proposedTransaction_ != null) { proposedTransaction_ = org.hyperledger.fabric.protos.peer.SignedProposal.newBuilder(proposedTransaction_).mergeFrom(value).buildPartial(); } else { proposedTransaction_ = value; } onChanged(); } else { proposedTransactionBuilder_.mergeFrom(value); } return this; } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public Builder clearProposedTransaction() { if (proposedTransactionBuilder_ == null) { proposedTransaction_ = null; onChanged(); } else { proposedTransaction_ = null; proposedTransactionBuilder_ = null; } return this; } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public org.hyperledger.fabric.protos.peer.SignedProposal.Builder getProposedTransactionBuilder() { onChanged(); return getProposedTransactionFieldBuilder().getBuilder(); } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ public org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder getProposedTransactionOrBuilder() { if (proposedTransactionBuilder_ != null) { return proposedTransactionBuilder_.getMessageOrBuilder(); } else { return proposedTransaction_ == null ? org.hyperledger.fabric.protos.peer.SignedProposal.getDefaultInstance() : proposedTransaction_; } } /** *
     * The signed proposal ready for endorsement.
     * 
* * .protos.SignedProposal proposed_transaction = 3 [json_name = "proposedTransaction"]; */ private com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder> getProposedTransactionFieldBuilder() { if (proposedTransactionBuilder_ == null) { proposedTransactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.hyperledger.fabric.protos.peer.SignedProposal, org.hyperledger.fabric.protos.peer.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.SignedProposalOrBuilder>( getProposedTransaction(), getParentForChildren(), isClean()); proposedTransaction_ = null; } return proposedTransactionBuilder_; } private com.google.protobuf.LazyStringList endorsingOrganizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureEndorsingOrganizationsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { endorsingOrganizations_ = new com.google.protobuf.LazyStringArrayList(endorsingOrganizations_); bitField0_ |= 0x00000001; } } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @return A list containing the endorsingOrganizations. */ public com.google.protobuf.ProtocolStringList getEndorsingOrganizationsList() { return endorsingOrganizations_.getUnmodifiableView(); } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @return The count of endorsingOrganizations. */ public int getEndorsingOrganizationsCount() { return endorsingOrganizations_.size(); } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param index The index of the element to return. * @return The endorsingOrganizations at the given index. */ public java.lang.String getEndorsingOrganizations(int index) { return endorsingOrganizations_.get(index); } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param index The index of the value to return. * @return The bytes of the endorsingOrganizations at the given index. */ public com.google.protobuf.ByteString getEndorsingOrganizationsBytes(int index) { return endorsingOrganizations_.getByteString(index); } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param index The index to set the value at. * @param value The endorsingOrganizations to set. * @return This builder for chaining. */ public Builder setEndorsingOrganizations( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureEndorsingOrganizationsIsMutable(); endorsingOrganizations_.set(index, value); onChanged(); return this; } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param value The endorsingOrganizations to add. * @return This builder for chaining. */ public Builder addEndorsingOrganizations( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureEndorsingOrganizationsIsMutable(); endorsingOrganizations_.add(value); onChanged(); return this; } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param values The endorsingOrganizations to add. * @return This builder for chaining. */ public Builder addAllEndorsingOrganizations( java.lang.Iterable values) { ensureEndorsingOrganizationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, endorsingOrganizations_); onChanged(); return this; } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @return This builder for chaining. */ public Builder clearEndorsingOrganizations() { endorsingOrganizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * If targeting the peers of specific organizations (e.g. for private data scenarios),
     * the list of organizations' MSPIDs should be supplied here.
     * 
* * repeated string endorsing_organizations = 4 [json_name = "endorsingOrganizations"]; * @param value The bytes of the endorsingOrganizations to add. * @return This builder for chaining. */ public Builder addEndorsingOrganizationsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureEndorsingOrganizationsIsMutable(); endorsingOrganizations_.add(value); 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:gateway.EndorseRequest) } // @@protoc_insertion_point(class_scope:gateway.EndorseRequest) private static final org.hyperledger.fabric.protos.gateway.EndorseRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gateway.EndorseRequest(); } public static org.hyperledger.fabric.protos.gateway.EndorseRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public EndorseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EndorseRequest(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.gateway.EndorseRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy