Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: discovery/protocol.proto
package org.hyperledger.fabric.protos.discovery;
public final class Protocol {
private Protocol() {}
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 SignedRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.SignedRequest)
com.google.protobuf.MessageOrBuilder {
/**
* bytes payload = 1;
*/
com.google.protobuf.ByteString getPayload();
/**
* bytes signature = 2;
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* SignedRequest contains a serialized Request in the payload field
* and a signature.
* The identity that is used to verify the signature
* can be extracted from the authentication field of type AuthInfo
* in the Request itself after deserializing it.
*
*
* Protobuf type {@code discovery.SignedRequest}
*/
public static final class SignedRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.SignedRequest)
SignedRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SignedRequest.newBuilder() to construct.
private SignedRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SignedRequest() {
payload_ = 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 SignedRequest(
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: {
payload_ = 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.discovery.Protocol.internal_static_discovery_SignedRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_SignedRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.class, org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString payload_;
/**
* bytes payload = 1;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
* 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 (!payload_.isEmpty()) {
output.writeBytes(1, payload_);
}
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 (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, payload_);
}
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.discovery.Protocol.SignedRequest)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest other = (org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest) obj;
if (!getPayload()
.equals(other.getPayload())) 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) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().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.discovery.Protocol.SignedRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest 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.discovery.Protocol.SignedRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest 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.discovery.Protocol.SignedRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest 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.discovery.Protocol.SignedRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest 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.discovery.Protocol.SignedRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest 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.discovery.Protocol.SignedRequest 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;
}
/**
*
* SignedRequest contains a serialized Request in the payload field
* and a signature.
* The identity that is used to verify the signature
* can be extracted from the authentication field of type AuthInfo
* in the Request itself after deserializing it.
*
*
* Protobuf type {@code discovery.SignedRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.SignedRequest)
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_SignedRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_SignedRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.class, org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.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();
payload_ = 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.discovery.Protocol.internal_static_discovery_SignedRequest_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest build() {
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest result = new org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest(this);
result.payload_ = payload_;
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.discovery.Protocol.SignedRequest) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.getDefaultInstance()) return this;
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
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.discovery.Protocol.SignedRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes payload = 1;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 1;
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
* bytes payload = 1;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
* bytes signature = 2;
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
* 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:discovery.SignedRequest)
}
// @@protoc_insertion_point(class_scope:discovery.SignedRequest)
private static final org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SignedRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SignedRequest(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.discovery.Protocol.SignedRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.Request)
com.google.protobuf.MessageOrBuilder {
/**
*
* authentication contains information that the service uses to check
* the client's eligibility for the queries.
*
* The results are returned in the same order of the queries
*
*
* repeated .discovery.QueryResult results = 1;
*/
public java.util.List
getResultsBuilderList() {
return getResultsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult, org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.Builder, org.hyperledger.fabric.protos.discovery.Protocol.QueryResultOrBuilder>
getResultsFieldBuilder() {
if (resultsBuilder_ == null) {
resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult, org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.Builder, org.hyperledger.fabric.protos.discovery.Protocol.QueryResultOrBuilder>(
results_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
results_ = null;
}
return resultsBuilder_;
}
@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:discovery.Response)
}
// @@protoc_insertion_point(class_scope:discovery.Response)
private static final org.hyperledger.fabric.protos.discovery.Protocol.Response DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.Response();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.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.discovery.Protocol.Response getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AuthInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.AuthInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
* This is the identity of the client that is used to verify the signature
* on the SignedRequest's payload.
* It is a msp.SerializedIdentity in bytes form
*
* This is the hash of the client's TLS cert.
* When the network is running with TLS, clients that don't include a certificate
* will be denied access to the service.
* Since the Request is encapsulated with a SignedRequest (which is signed),
* this binds the TLS session to the enrollement identity of the client and
* therefore both authenticates the client to the server,
* and also prevents the server from relaying the request message to another server.
*
* AuthInfo aggregates authentication information that the server uses
* to authenticate the client
*
*
* Protobuf type {@code discovery.AuthInfo}
*/
public static final class AuthInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.AuthInfo)
AuthInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use AuthInfo.newBuilder() to construct.
private AuthInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AuthInfo() {
clientIdentity_ = com.google.protobuf.ByteString.EMPTY;
clientTlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AuthInfo(
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: {
clientIdentity_ = input.readBytes();
break;
}
case 18: {
clientTlsCertHash_ = 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.discovery.Protocol.internal_static_discovery_AuthInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.class, org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.Builder.class);
}
public static final int CLIENT_IDENTITY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString clientIdentity_;
/**
*
* This is the identity of the client that is used to verify the signature
* on the SignedRequest's payload.
* It is a msp.SerializedIdentity in bytes form
*
*
* bytes client_identity = 1;
*/
public com.google.protobuf.ByteString getClientIdentity() {
return clientIdentity_;
}
public static final int CLIENT_TLS_CERT_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString clientTlsCertHash_;
/**
*
* This is the hash of the client's TLS cert.
* When the network is running with TLS, clients that don't include a certificate
* will be denied access to the service.
* Since the Request is encapsulated with a SignedRequest (which is signed),
* this binds the TLS session to the enrollement identity of the client and
* therefore both authenticates the client to the server,
* and also prevents the server from relaying the request message to another server.
*
* AuthInfo aggregates authentication information that the server uses
* to authenticate the client
*
*
* Protobuf type {@code discovery.AuthInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.AuthInfo)
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.class, org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.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();
clientIdentity_ = com.google.protobuf.ByteString.EMPTY;
clientTlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo build() {
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo result = new org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo(this);
result.clientIdentity_ = clientIdentity_;
result.clientTlsCertHash_ = clientTlsCertHash_;
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.discovery.Protocol.AuthInfo) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.getDefaultInstance()) return this;
if (other.getClientIdentity() != com.google.protobuf.ByteString.EMPTY) {
setClientIdentity(other.getClientIdentity());
}
if (other.getClientTlsCertHash() != com.google.protobuf.ByteString.EMPTY) {
setClientTlsCertHash(other.getClientTlsCertHash());
}
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.discovery.Protocol.AuthInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString clientIdentity_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* This is the identity of the client that is used to verify the signature
* on the SignedRequest's payload.
* It is a msp.SerializedIdentity in bytes form
*
* This is the identity of the client that is used to verify the signature
* on the SignedRequest's payload.
* It is a msp.SerializedIdentity in bytes form
*
*
* bytes client_identity = 1;
*/
public Builder setClientIdentity(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
clientIdentity_ = value;
onChanged();
return this;
}
/**
*
* This is the identity of the client that is used to verify the signature
* on the SignedRequest's payload.
* It is a msp.SerializedIdentity in bytes form
*
* This is the hash of the client's TLS cert.
* When the network is running with TLS, clients that don't include a certificate
* will be denied access to the service.
* Since the Request is encapsulated with a SignedRequest (which is signed),
* this binds the TLS session to the enrollement identity of the client and
* therefore both authenticates the client to the server,
* and also prevents the server from relaying the request message to another server.
*
* This is the hash of the client's TLS cert.
* When the network is running with TLS, clients that don't include a certificate
* will be denied access to the service.
* Since the Request is encapsulated with a SignedRequest (which is signed),
* this binds the TLS session to the enrollement identity of the client and
* therefore both authenticates the client to the server,
* and also prevents the server from relaying the request message to another server.
*
*
* bytes client_tls_cert_hash = 2;
*/
public Builder setClientTlsCertHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
clientTlsCertHash_ = value;
onChanged();
return this;
}
/**
*
* This is the hash of the client's TLS cert.
* When the network is running with TLS, clients that don't include a certificate
* will be denied access to the service.
* Since the Request is encapsulated with a SignedRequest (which is signed),
* this binds the TLS session to the enrollement identity of the client and
* therefore both authenticates the client to the server,
* and also prevents the server from relaying the request message to another server.
*
*
* bytes client_tls_cert_hash = 2;
*/
public Builder clearClientTlsCertHash() {
clientTlsCertHash_ = getDefaultInstance().getClientTlsCertHash();
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:discovery.AuthInfo)
}
// @@protoc_insertion_point(class_scope:discovery.AuthInfo)
private static final org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AuthInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AuthInfo(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.discovery.Protocol.AuthInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.Query)
com.google.protobuf.MessageOrBuilder {
/**
* string channel = 1;
*/
java.lang.String getChannel();
/**
* string channel = 1;
*/
com.google.protobuf.ByteString
getChannelBytes();
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* Query asks for information in the context of a specific channel
*
*
* Protobuf type {@code discovery.Query}
*/
public static final class Query extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.Query)
QueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use Query.newBuilder() to construct.
private Query(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Query() {
channel_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Query(
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();
channel_ = s;
break;
}
case 18: {
org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery.Builder subBuilder = null;
if (queryCase_ == 2) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery) query_).toBuilder();
}
query_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery) query_);
query_ = subBuilder.buildPartial();
}
queryCase_ = 2;
break;
}
case 26: {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.Builder subBuilder = null;
if (queryCase_ == 3) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery) query_).toBuilder();
}
query_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery) query_);
query_ = subBuilder.buildPartial();
}
queryCase_ = 3;
break;
}
case 34: {
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery.Builder subBuilder = null;
if (queryCase_ == 4) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery) query_).toBuilder();
}
query_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery) query_);
query_ = subBuilder.buildPartial();
}
queryCase_ = 4;
break;
}
case 42: {
org.hyperledger.fabric.protos.discovery.Protocol.LocalPeerQuery.Builder subBuilder = null;
if (queryCase_ == 5) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.LocalPeerQuery) query_).toBuilder();
}
query_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.LocalPeerQuery.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.LocalPeerQuery) query_);
query_ = subBuilder.buildPartial();
}
queryCase_ = 5;
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.discovery.Protocol.internal_static_discovery_Query_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_Query_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.Query.class, org.hyperledger.fabric.protos.discovery.Protocol.Query.Builder.class);
}
private int queryCase_ = 0;
private java.lang.Object query_;
public enum QueryCase
implements com.google.protobuf.Internal.EnumLite {
CONFIG_QUERY(2),
PEER_QUERY(3),
CC_QUERY(4),
LOCAL_PEERS(5),
QUERY_NOT_SET(0);
private final int value;
private QueryCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static QueryCase valueOf(int value) {
return forNumber(value);
}
public static QueryCase forNumber(int value) {
switch (value) {
case 2: return CONFIG_QUERY;
case 3: return PEER_QUERY;
case 4: return CC_QUERY;
case 5: return LOCAL_PEERS;
case 0: return QUERY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public QueryCase
getQueryCase() {
return QueryCase.forNumber(
queryCase_);
}
public static final int CHANNEL_FIELD_NUMBER = 1;
private volatile java.lang.Object channel_;
/**
* string channel = 1;
*/
public java.lang.String getChannel() {
java.lang.Object ref = channel_;
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();
channel_ = s;
return s;
}
}
/**
* string channel = 1;
*/
public com.google.protobuf.ByteString
getChannelBytes() {
java.lang.Object ref = channel_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONFIG_QUERY_FIELD_NUMBER = 2;
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ConfigQueryOrBuilder getConfigQueryOrBuilder() {
if (queryCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.Protocol.ConfigQuery.getDefaultInstance();
}
public static final int PEER_QUERY_FIELD_NUMBER = 3;
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4;
*/
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResultOrBuilder getMembersOrBuilder();
public org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.ResultCase getResultCase();
}
/**
*
* QueryResult contains a result for a given Query.
* The corresponding Query can be inferred by the index of the QueryResult from
* its enclosing Response message.
* QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request.
*
*
* Protobuf type {@code discovery.QueryResult}
*/
public static final class QueryResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.QueryResult)
QueryResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryResult.newBuilder() to construct.
private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryResult() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryResult(
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: {
org.hyperledger.fabric.protos.discovery.Protocol.Error.Builder subBuilder = null;
if (resultCase_ == 1) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.Error) result_).toBuilder();
}
result_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.Error) result_);
result_ = subBuilder.buildPartial();
}
resultCase_ = 1;
break;
}
case 18: {
org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult.Builder subBuilder = null;
if (resultCase_ == 2) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult) result_).toBuilder();
}
result_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult) result_);
result_ = subBuilder.buildPartial();
}
resultCase_ = 2;
break;
}
case 26: {
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult.Builder subBuilder = null;
if (resultCase_ == 3) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult) result_).toBuilder();
}
result_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult) result_);
result_ = subBuilder.buildPartial();
}
resultCase_ = 3;
break;
}
case 34: {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.Builder subBuilder = null;
if (resultCase_ == 4) {
subBuilder = ((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_).toBuilder();
}
result_ =
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_);
result_ = subBuilder.buildPartial();
}
resultCase_ = 4;
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.discovery.Protocol.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.class, org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.Builder.class);
}
private int resultCase_ = 0;
private java.lang.Object result_;
public enum ResultCase
implements com.google.protobuf.Internal.EnumLite {
ERROR(1),
CONFIG_RESULT(2),
CC_QUERY_RES(3),
MEMBERS(4),
RESULT_NOT_SET(0);
private final int value;
private ResultCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResultCase valueOf(int value) {
return forNumber(value);
}
public static ResultCase forNumber(int value) {
switch (value) {
case 1: return ERROR;
case 2: return CONFIG_RESULT;
case 3: return CC_QUERY_RES;
case 4: return MEMBERS;
case 0: return RESULT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ResultCase
getResultCase() {
return ResultCase.forNumber(
resultCase_);
}
public static final int ERROR_FIELD_NUMBER = 1;
/**
*
* Error indicates failure or refusal to process the query
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResultOrBuilder getCcQueryResOrBuilder() {
if (resultCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult) result_;
}
return org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult.getDefaultInstance();
}
public static final int MEMBERS_FIELD_NUMBER = 4;
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4;
*/
public boolean hasMembers() {
return resultCase_ == 4;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult getMembers() {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.getDefaultInstance();
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResultOrBuilder getMembersOrBuilder() {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.getDefaultInstance();
}
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 (resultCase_ == 1) {
output.writeMessage(1, (org.hyperledger.fabric.protos.discovery.Protocol.Error) result_);
}
if (resultCase_ == 2) {
output.writeMessage(2, (org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult) result_);
}
if (resultCase_ == 3) {
output.writeMessage(3, (org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult) result_);
}
if (resultCase_ == 4) {
output.writeMessage(4, (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (resultCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.hyperledger.fabric.protos.discovery.Protocol.Error) result_);
}
if (resultCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult) result_);
}
if (resultCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQueryResult) result_);
}
if (resultCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) result_);
}
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.discovery.Protocol.QueryResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult other = (org.hyperledger.fabric.protos.discovery.Protocol.QueryResult) obj;
if (!getResultCase().equals(other.getResultCase())) return false;
switch (resultCase_) {
case 1:
if (!getError()
.equals(other.getError())) return false;
break;
case 2:
if (!getConfigResult()
.equals(other.getConfigResult())) return false;
break;
case 3:
if (!getCcQueryRes()
.equals(other.getCcQueryRes())) return false;
break;
case 4:
if (!getMembers()
.equals(other.getMembers())) return false;
break;
case 0:
default:
}
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();
switch (resultCase_) {
case 1:
hash = (37 * hash) + ERROR_FIELD_NUMBER;
hash = (53 * hash) + getError().hashCode();
break;
case 2:
hash = (37 * hash) + CONFIG_RESULT_FIELD_NUMBER;
hash = (53 * hash) + getConfigResult().hashCode();
break;
case 3:
hash = (37 * hash) + CC_QUERY_RES_FIELD_NUMBER;
hash = (53 * hash) + getCcQueryRes().hashCode();
break;
case 4:
hash = (37 * hash) + MEMBERS_FIELD_NUMBER;
hash = (53 * hash) + getMembers().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult 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.discovery.Protocol.QueryResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult 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.discovery.Protocol.QueryResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult 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.discovery.Protocol.QueryResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult 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.discovery.Protocol.QueryResult parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.QueryResult 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.discovery.Protocol.QueryResult 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;
}
/**
*
* QueryResult contains a result for a given Query.
* The corresponding Query can be inferred by the index of the QueryResult from
* its enclosing Response message.
* QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request.
*
*
* Protobuf type {@code discovery.QueryResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.QueryResult)
org.hyperledger.fabric.protos.discovery.Protocol.QueryResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.class, org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.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();
resultCase_ = 0;
result_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.QueryResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.QueryResult build() {
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.QueryResult buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.QueryResult result = new org.hyperledger.fabric.protos.discovery.Protocol.QueryResult(this);
if (resultCase_ == 1) {
if (errorBuilder_ == null) {
result.result_ = result_;
} else {
result.result_ = errorBuilder_.build();
}
}
if (resultCase_ == 2) {
if (configResultBuilder_ == null) {
result.result_ = result_;
} else {
result.result_ = configResultBuilder_.build();
}
}
if (resultCase_ == 3) {
if (ccQueryResBuilder_ == null) {
result.result_ = result_;
} else {
result.result_ = ccQueryResBuilder_.build();
}
}
if (resultCase_ == 4) {
if (membersBuilder_ == null) {
result.result_ = result_;
} else {
result.result_ = membersBuilder_.build();
}
}
result.resultCase_ = resultCase_;
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.discovery.Protocol.QueryResult) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.QueryResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.QueryResult other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.getDefaultInstance()) return this;
switch (other.getResultCase()) {
case ERROR: {
mergeError(other.getError());
break;
}
case CONFIG_RESULT: {
mergeConfigResult(other.getConfigResult());
break;
}
case CC_QUERY_RES: {
mergeCcQueryRes(other.getCcQueryRes());
break;
}
case MEMBERS: {
mergeMembers(other.getMembers());
break;
}
case RESULT_NOT_SET: {
break;
}
}
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.discovery.Protocol.QueryResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.QueryResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int resultCase_ = 0;
private java.lang.Object result_;
public ResultCase
getResultCase() {
return ResultCase.forNumber(
resultCase_);
}
public Builder clearResult() {
resultCase_ = 0;
result_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.discovery.Protocol.Error, org.hyperledger.fabric.protos.discovery.Protocol.Error.Builder, org.hyperledger.fabric.protos.discovery.Protocol.ErrorOrBuilder> errorBuilder_;
/**
*
* Error indicates failure or refusal to process the query
*
* orderers is a map from MSP_ID to endpoint lists of orderers
*
*
* map<string, .discovery.Endpoints> orderers = 2;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Endpoints getOrderersOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetOrderers().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearOrderers() {
internalGetMutableOrderers().getMutableMap()
.clear();
return this;
}
/**
*
* orderers is a map from MSP_ID to endpoint lists of orderers
*
*
* map<string, .discovery.Endpoints> orderers = 2;
*/
public Builder removeOrderers(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableOrderers().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableOrderers() {
return internalGetMutableOrderers().getMutableMap();
}
/**
*
* orderers is a map from MSP_ID to endpoint lists of orderers
*
*
* map<string, .discovery.Endpoints> orderers = 2;
*/
public Builder putOrderers(
java.lang.String key,
org.hyperledger.fabric.protos.discovery.Protocol.Endpoints value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableOrderers().getMutableMap()
.put(key, value);
return this;
}
/**
*
* orderers is a map from MSP_ID to endpoint lists of orderers
*
*
* map<string, .discovery.Endpoints> orderers = 2;
*/
public Builder putAllOrderers(
java.util.Map values) {
internalGetMutableOrderers().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:discovery.ConfigResult)
}
// @@protoc_insertion_point(class_scope:discovery.ConfigResult)
private static final org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ConfigResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConfigResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConfigResult(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.discovery.Protocol.ConfigResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PeerMembershipQueryOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.PeerMembershipQuery)
com.google.protobuf.MessageOrBuilder {
/**
* .discovery.ChaincodeInterest filter = 1;
*/
boolean hasFilter();
/**
* .discovery.ChaincodeInterest filter = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest getFilter();
/**
* .discovery.ChaincodeInterest filter = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder getFilterOrBuilder();
}
/**
*
* PeerMembershipQuery requests PeerMembershipResult.
* The filter field may be optionally populated in order
* for the peer membership to be filtered according to
* chaincodes that are installed on peers and collection
* access control policies.
*
*
* Protobuf type {@code discovery.PeerMembershipQuery}
*/
public static final class PeerMembershipQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.PeerMembershipQuery)
PeerMembershipQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use PeerMembershipQuery.newBuilder() to construct.
private PeerMembershipQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PeerMembershipQuery() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PeerMembershipQuery(
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: {
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.Builder subBuilder = null;
if (filter_ != null) {
subBuilder = filter_.toBuilder();
}
filter_ = input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(filter_);
filter_ = 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.discovery.Protocol.internal_static_discovery_PeerMembershipQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.class, org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.Builder.class);
}
public static final int FILTER_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest filter_;
/**
* .discovery.ChaincodeInterest filter = 1;
*/
public boolean hasFilter() {
return filter_ != null;
}
/**
* .discovery.ChaincodeInterest filter = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest getFilter() {
return filter_ == null ? org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.getDefaultInstance() : filter_;
}
/**
* .discovery.ChaincodeInterest filter = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder getFilterOrBuilder() {
return getFilter();
}
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 (filter_ != null) {
output.writeMessage(1, getFilter());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (filter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFilter());
}
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.discovery.Protocol.PeerMembershipQuery)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery other = (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery) obj;
if (hasFilter() != other.hasFilter()) return false;
if (hasFilter()) {
if (!getFilter()
.equals(other.getFilter())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFilter()) {
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery 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.discovery.Protocol.PeerMembershipQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery 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.discovery.Protocol.PeerMembershipQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery 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.discovery.Protocol.PeerMembershipQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery 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.discovery.Protocol.PeerMembershipQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery 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.discovery.Protocol.PeerMembershipQuery 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;
}
/**
*
* PeerMembershipQuery requests PeerMembershipResult.
* The filter field may be optionally populated in order
* for the peer membership to be filtered according to
* chaincodes that are installed on peers and collection
* access control policies.
*
* PeerMembershipResult contains peers mapped by their organizations (MSP_ID)
*
*
* Protobuf type {@code discovery.PeerMembershipResult}
*/
public static final class PeerMembershipResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.PeerMembershipResult)
PeerMembershipResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use PeerMembershipResult.newBuilder() to construct.
private PeerMembershipResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PeerMembershipResult() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PeerMembershipResult(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
peersByOrg_ = com.google.protobuf.MapField.newMapField(
PeersByOrgDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
peersByOrg__ = input.readMessage(
PeersByOrgDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
peersByOrg_.getMutableMap().put(
peersByOrg__.getKey(), peersByOrg__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetPeersByOrg();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.class, org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.Builder.class);
}
public static final int PEERS_BY_ORG_FIELD_NUMBER = 1;
private static final class PeersByOrgDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, org.hyperledger.fabric.protos.discovery.Protocol.Peers> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_PeersByOrgEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
org.hyperledger.fabric.protos.discovery.Protocol.Peers.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, org.hyperledger.fabric.protos.discovery.Protocol.Peers> peersByOrg_;
private com.google.protobuf.MapField
internalGetPeersByOrg() {
if (peersByOrg_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PeersByOrgDefaultEntryHolder.defaultEntry);
}
return peersByOrg_;
}
public int getPeersByOrgCount() {
return internalGetPeersByOrg().getMap().size();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public boolean containsPeersByOrg(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPeersByOrg().getMap().containsKey(key);
}
/**
* Use {@link #getPeersByOrgMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPeersByOrg() {
return getPeersByOrgMap();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public java.util.Map getPeersByOrgMap() {
return internalGetPeersByOrg().getMap();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrDefault(
java.lang.String key,
org.hyperledger.fabric.protos.discovery.Protocol.Peers defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPeersByOrg().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPeersByOrg().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetPeersByOrg(),
PeersByOrgDefaultEntryHolder.defaultEntry,
1);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetPeersByOrg().getMap().entrySet()) {
com.google.protobuf.MapEntry
peersByOrg__ = PeersByOrgDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, peersByOrg__);
}
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.discovery.Protocol.PeerMembershipResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult other = (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) obj;
if (!internalGetPeersByOrg().equals(
other.internalGetPeersByOrg())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetPeersByOrg().getMap().isEmpty()) {
hash = (37 * hash) + PEERS_BY_ORG_FIELD_NUMBER;
hash = (53 * hash) + internalGetPeersByOrg().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult 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.discovery.Protocol.PeerMembershipResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult 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.discovery.Protocol.PeerMembershipResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult 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.discovery.Protocol.PeerMembershipResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult 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.discovery.Protocol.PeerMembershipResult parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult 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.discovery.Protocol.PeerMembershipResult 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;
}
/**
*
* PeerMembershipResult contains peers mapped by their organizations (MSP_ID)
*
*
* Protobuf type {@code discovery.PeerMembershipResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.PeerMembershipResult)
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetPeersByOrg();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutablePeersByOrg();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.class, org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.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();
internalGetMutablePeersByOrg().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult build() {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult result = new org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult(this);
int from_bitField0_ = bitField0_;
result.peersByOrg_ = internalGetPeersByOrg();
result.peersByOrg_.makeImmutable();
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.discovery.Protocol.PeerMembershipResult) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.getDefaultInstance()) return this;
internalGetMutablePeersByOrg().mergeFrom(
other.internalGetPeersByOrg());
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.discovery.Protocol.PeerMembershipResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, org.hyperledger.fabric.protos.discovery.Protocol.Peers> peersByOrg_;
private com.google.protobuf.MapField
internalGetPeersByOrg() {
if (peersByOrg_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PeersByOrgDefaultEntryHolder.defaultEntry);
}
return peersByOrg_;
}
private com.google.protobuf.MapField
internalGetMutablePeersByOrg() {
onChanged();;
if (peersByOrg_ == null) {
peersByOrg_ = com.google.protobuf.MapField.newMapField(
PeersByOrgDefaultEntryHolder.defaultEntry);
}
if (!peersByOrg_.isMutable()) {
peersByOrg_ = peersByOrg_.copy();
}
return peersByOrg_;
}
public int getPeersByOrgCount() {
return internalGetPeersByOrg().getMap().size();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public boolean containsPeersByOrg(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPeersByOrg().getMap().containsKey(key);
}
/**
* Use {@link #getPeersByOrgMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPeersByOrg() {
return getPeersByOrgMap();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public java.util.Map getPeersByOrgMap() {
return internalGetPeersByOrg().getMap();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrDefault(
java.lang.String key,
org.hyperledger.fabric.protos.discovery.Protocol.Peers defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPeersByOrg().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPeersByOrg().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearPeersByOrg() {
internalGetMutablePeersByOrg().getMutableMap()
.clear();
return this;
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public Builder removePeersByOrg(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutablePeersByOrg().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePeersByOrg() {
return internalGetMutablePeersByOrg().getMutableMap();
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public Builder putPeersByOrg(
java.lang.String key,
org.hyperledger.fabric.protos.discovery.Protocol.Peers value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutablePeersByOrg().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public Builder putAllPeersByOrg(
java.util.Map values) {
internalGetMutablePeersByOrg().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:discovery.PeerMembershipResult)
}
// @@protoc_insertion_point(class_scope:discovery.PeerMembershipResult)
private static final org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PeerMembershipResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PeerMembershipResult(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.discovery.Protocol.PeerMembershipResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeQueryOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.ChaincodeQuery)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
java.util.List
getInterestsList();
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest getInterests(int index);
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
int getInterestsCount();
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
java.util.List extends org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder>
getInterestsOrBuilderList();
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder getInterestsOrBuilder(
int index);
}
/**
*
* ChaincodeQuery requests ChaincodeQueryResults for a given
* list of chaincode invocations.
* Each invocation is a separate one, and the endorsement policy
* is evaluated independantly for each given interest.
*
*
* Protobuf type {@code discovery.ChaincodeQuery}
*/
public static final class ChaincodeQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.ChaincodeQuery)
ChaincodeQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeQuery.newBuilder() to construct.
private ChaincodeQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeQuery() {
interests_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeQuery(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
interests_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
interests_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.parser(), extensionRegistry));
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)) {
interests_ = java.util.Collections.unmodifiableList(interests_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery.class, org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery.Builder.class);
}
public static final int INTERESTS_FIELD_NUMBER = 1;
private java.util.List interests_;
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
public java.util.List getInterestsList() {
return interests_;
}
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
public java.util.List extends org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder>
getInterestsOrBuilderList() {
return interests_;
}
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
public int getInterestsCount() {
return interests_.size();
}
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest getInterests(int index) {
return interests_.get(index);
}
/**
* repeated .discovery.ChaincodeInterest interests = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterestOrBuilder getInterestsOrBuilder(
int index) {
return interests_.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 {
for (int i = 0; i < interests_.size(); i++) {
output.writeMessage(1, interests_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < interests_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, interests_.get(i));
}
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.discovery.Protocol.ChaincodeQuery)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery other = (org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery) obj;
if (!getInterestsList()
.equals(other.getInterestsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getInterestsCount() > 0) {
hash = (37 * hash) + INTERESTS_FIELD_NUMBER;
hash = (53 * hash) + getInterestsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery 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.discovery.Protocol.ChaincodeQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery 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.discovery.Protocol.ChaincodeQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery 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.discovery.Protocol.ChaincodeQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery 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.discovery.Protocol.ChaincodeQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeQuery 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.discovery.Protocol.ChaincodeQuery 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;
}
/**
*
* ChaincodeQuery requests ChaincodeQueryResults for a given
* list of chaincode invocations.
* Each invocation is a separate one, and the endorsement policy
* is evaluated independantly for each given interest.
*
* ChaincodeInterest defines an interest about an endorsement
* for a specific single chaincode invocation.
* Multiple chaincodes indicate chaincode to chaincode invocations.
*
*
* Protobuf type {@code discovery.ChaincodeInterest}
*/
public static final class ChaincodeInterest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.ChaincodeInterest)
ChaincodeInterestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeInterest.newBuilder() to construct.
private ChaincodeInterest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeInterest() {
chaincodes_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeInterest(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
chaincodes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
chaincodes_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeCall.parser(), extensionRegistry));
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)) {
chaincodes_ = java.util.Collections.unmodifiableList(chaincodes_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeInterest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeInterest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.class, org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.Builder.class);
}
public static final int CHAINCODES_FIELD_NUMBER = 1;
private java.util.List chaincodes_;
/**
* repeated .discovery.ChaincodeCall chaincodes = 1;
*/
public java.util.List getChaincodesList() {
return chaincodes_;
}
/**
* repeated .discovery.ChaincodeCall chaincodes = 1;
*/
public java.util.List extends org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeCallOrBuilder>
getChaincodesOrBuilderList() {
return chaincodes_;
}
/**
* repeated .discovery.ChaincodeCall chaincodes = 1;
*/
public int getChaincodesCount() {
return chaincodes_.size();
}
/**
* repeated .discovery.ChaincodeCall chaincodes = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeCall getChaincodes(int index) {
return chaincodes_.get(index);
}
/**
* repeated .discovery.ChaincodeCall chaincodes = 1;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeCallOrBuilder getChaincodesOrBuilder(
int index) {
return chaincodes_.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 {
for (int i = 0; i < chaincodes_.size(); i++) {
output.writeMessage(1, chaincodes_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < chaincodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, chaincodes_.get(i));
}
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.discovery.Protocol.ChaincodeInterest)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest other = (org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest) obj;
if (!getChaincodesList()
.equals(other.getChaincodesList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getChaincodesCount() > 0) {
hash = (37 * hash) + CHAINCODES_FIELD_NUMBER;
hash = (53 * hash) + getChaincodesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest 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.discovery.Protocol.ChaincodeInterest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest 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.discovery.Protocol.ChaincodeInterest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest 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.discovery.Protocol.ChaincodeInterest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest 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.discovery.Protocol.ChaincodeInterest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest 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.discovery.Protocol.ChaincodeInterest 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;
}
/**
*
* ChaincodeInterest defines an interest about an endorsement
* for a specific single chaincode invocation.
* Multiple chaincodes indicate chaincode to chaincode invocations.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* EndorsementDescriptor contains information about which peers can be used
* to request endorsement from, such that the endorsement policy would be fulfilled.
* Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor:
* Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers.
* Note that applying e on a group g yields a set of peers.
* 1) Select a layout l: G --> N out of the layouts given.
* l is the quantities_by_group field of a Layout, and it maps a group to an integer.
* 2) R = {} (an empty set of peers)
* 3) For each group g in the layout l, compute n = l(g)
* 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g)
* 3.2) R = R U P_g (add P_g to R)
* 4) The set of peers R is the peers the client needs to request endorsements from
*
*
* Protobuf type {@code discovery.EndorsementDescriptor}
*/
public static final class EndorsementDescriptor extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:discovery.EndorsementDescriptor)
EndorsementDescriptorOrBuilder {
private static final long serialVersionUID = 0L;
// Use EndorsementDescriptor.newBuilder() to construct.
private EndorsementDescriptor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EndorsementDescriptor() {
chaincode_ = "";
layouts_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private EndorsementDescriptor(
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();
chaincode_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
endorsersByGroups_ = com.google.protobuf.MapField.newMapField(
EndorsersByGroupsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
endorsersByGroups__ = input.readMessage(
EndorsersByGroupsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
endorsersByGroups_.getMutableMap().put(
endorsersByGroups__.getKey(), endorsersByGroups__.getValue());
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
layouts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
layouts_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.Layout.parser(), extensionRegistry));
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_ & 0x00000004) != 0)) {
layouts_ = java.util.Collections.unmodifiableList(layouts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetEndorsersByGroups();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor.class, org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor.Builder.class);
}
private int bitField0_;
public static final int CHAINCODE_FIELD_NUMBER = 1;
private volatile java.lang.Object chaincode_;
/**
* string chaincode = 1;
*/
public java.lang.String getChaincode() {
java.lang.Object ref = chaincode_;
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();
chaincode_ = s;
return s;
}
}
/**
* string chaincode = 1;
*/
public com.google.protobuf.ByteString
getChaincodeBytes() {
java.lang.Object ref = chaincode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
chaincode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENDORSERS_BY_GROUPS_FIELD_NUMBER = 2;
private static final class EndorsersByGroupsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, org.hyperledger.fabric.protos.discovery.Protocol.Peers> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_EndorsersByGroupsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
org.hyperledger.fabric.protos.discovery.Protocol.Peers.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, org.hyperledger.fabric.protos.discovery.Protocol.Peers> endorsersByGroups_;
private com.google.protobuf.MapField
internalGetEndorsersByGroups() {
if (endorsersByGroups_ == null) {
return com.google.protobuf.MapField.emptyMapField(
EndorsersByGroupsDefaultEntryHolder.defaultEntry);
}
return endorsersByGroups_;
}
public int getEndorsersByGroupsCount() {
return internalGetEndorsersByGroups().getMap().size();
}
/**
*
* Specifies the endorsers, separated to groups.
*
*
* map<string, .discovery.Peers> endorsers_by_groups = 2;
*/
public boolean containsEndorsersByGroups(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetEndorsersByGroups().getMap().containsKey(key);
}
/**
* Use {@link #getEndorsersByGroupsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getEndorsersByGroups() {
return getEndorsersByGroupsMap();
}
/**
*
*
* map<string, .discovery.Peers> endorsers_by_groups = 2;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Peers getEndorsersByGroupsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetEndorsersByGroups().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int LAYOUTS_FIELD_NUMBER = 3;
private java.util.List layouts_;
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public int getLayoutsCount() {
return layouts_.size();
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.LayoutOrBuilder getLayoutsOrBuilder(
int index) {
return layouts_.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 (!getChaincodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, chaincode_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetEndorsersByGroups(),
EndorsersByGroupsDefaultEntryHolder.defaultEntry,
2);
for (int i = 0; i < layouts_.size(); i++) {
output.writeMessage(3, layouts_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getChaincodeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, chaincode_);
}
for (java.util.Map.Entry entry
: internalGetEndorsersByGroups().getMap().entrySet()) {
com.google.protobuf.MapEntry
endorsersByGroups__ = EndorsersByGroupsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, endorsersByGroups__);
}
for (int i = 0; i < layouts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, layouts_.get(i));
}
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.discovery.Protocol.EndorsementDescriptor)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor other = (org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor) obj;
if (!getChaincode()
.equals(other.getChaincode())) return false;
if (!internalGetEndorsersByGroups().equals(
other.internalGetEndorsersByGroups())) return false;
if (!getLayoutsList()
.equals(other.getLayoutsList())) 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) + CHAINCODE_FIELD_NUMBER;
hash = (53 * hash) + getChaincode().hashCode();
if (!internalGetEndorsersByGroups().getMap().isEmpty()) {
hash = (37 * hash) + ENDORSERS_BY_GROUPS_FIELD_NUMBER;
hash = (53 * hash) + internalGetEndorsersByGroups().hashCode();
}
if (getLayoutsCount() > 0) {
hash = (37 * hash) + LAYOUTS_FIELD_NUMBER;
hash = (53 * hash) + getLayoutsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor 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.discovery.Protocol.EndorsementDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor 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.discovery.Protocol.EndorsementDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor 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.discovery.Protocol.EndorsementDescriptor parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor 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.discovery.Protocol.EndorsementDescriptor parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor 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.discovery.Protocol.EndorsementDescriptor 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;
}
/**
*
* EndorsementDescriptor contains information about which peers can be used
* to request endorsement from, such that the endorsement policy would be fulfilled.
* Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor:
* Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers.
* Note that applying e on a group g yields a set of peers.
* 1) Select a layout l: G --> N out of the layouts given.
* l is the quantities_by_group field of a Layout, and it maps a group to an integer.
* 2) R = {} (an empty set of peers)
* 3) For each group g in the layout l, compute n = l(g)
* 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g)
* 3.2) R = R U P_g (add P_g to R)
* 4) The set of peers R is the peers the client needs to request endorsements from
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public int getLayoutsCount() {
if (layoutsBuilder_ == null) {
return layouts_.size();
} else {
return layoutsBuilder_.getCount();
}
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public Builder setLayouts(
int index, org.hyperledger.fabric.protos.discovery.Protocol.Layout value) {
if (layoutsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayoutsIsMutable();
layouts_.set(index, value);
onChanged();
} else {
layoutsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public Builder addLayouts(org.hyperledger.fabric.protos.discovery.Protocol.Layout value) {
if (layoutsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayoutsIsMutable();
layouts_.add(value);
onChanged();
} else {
layoutsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public Builder addLayouts(
int index, org.hyperledger.fabric.protos.discovery.Protocol.Layout value) {
if (layoutsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayoutsIsMutable();
layouts_.add(index, value);
onChanged();
} else {
layoutsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.Layout.Builder getLayoutsBuilder(
int index) {
return getLayoutsFieldBuilder().getBuilder(index);
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public org.hyperledger.fabric.protos.discovery.Protocol.LayoutOrBuilder getLayoutsOrBuilder(
int index) {
if (layoutsBuilder_ == null) {
return layouts_.get(index); } else {
return layoutsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
* Specifies options of fulfulling the endorsement policy.
* Each option lists the group names, and the amount of signatures needed
* from each group.
*
*
* repeated .discovery.Layout layouts = 3;
*/
public java.util.List
getLayoutsBuilderList() {
return getLayoutsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.discovery.Protocol.Layout, org.hyperledger.fabric.protos.discovery.Protocol.Layout.Builder, org.hyperledger.fabric.protos.discovery.Protocol.LayoutOrBuilder>
getLayoutsFieldBuilder() {
if (layoutsBuilder_ == null) {
layoutsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.discovery.Protocol.Layout, org.hyperledger.fabric.protos.discovery.Protocol.Layout.Builder, org.hyperledger.fabric.protos.discovery.Protocol.LayoutOrBuilder>(
layouts_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
layouts_ = null;
}
return layoutsBuilder_;
}
@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:discovery.EndorsementDescriptor)
}
// @@protoc_insertion_point(class_scope:discovery.EndorsementDescriptor)
private static final org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EndorsementDescriptor parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new EndorsementDescriptor(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.discovery.Protocol.EndorsementDescriptor getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LayoutOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.Layout)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies how many non repeated signatures of each group
* are needed for endorsement
*