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 {
/**
* optional bytes payload = 1;
*/
com.google.protobuf.ByteString getPayload();
/**
* optional 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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private SignedRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
payload_ = input.readBytes();
break;
}
case 18: {
signature_ = input.readBytes();
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_SignedRequest_descriptor;
}
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_;
/**
* optional 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_;
/**
* optional bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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_);
}
}
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_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && getPayload()
.equals(other.getPayload());
result = result && getSignature()
.equals(other.getSignature());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
payload_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_SignedRequest_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.SignedRequest.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
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;
/**
* optional bytes payload = 1;
*/
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* optional bytes payload = 1;
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
* optional bytes payload = 1;
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes signature = 2;
*/
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
* optional bytes signature = 2;
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
* optional bytes signature = 2;
*/
public Builder clearSignature() {
signature_ = getDefaultInstance().getSignature();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@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() {
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;
}
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) == 0x00000001),
getParentForChildren(),
isClean());
results_ = null;
}
return resultsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@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() {
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;
}
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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private AuthInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
clientIdentity_ = input.readBytes();
break;
}
case 18: {
clientTlsCertHash_ = input.readBytes();
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_descriptor;
}
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
*
*
* optional 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.
*
*
* optional bytes client_tls_cert_hash = 2;
*/
public com.google.protobuf.ByteString getClientTlsCertHash() {
return clientTlsCertHash_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!clientIdentity_.isEmpty()) {
output.writeBytes(1, clientIdentity_);
}
if (!clientTlsCertHash_.isEmpty()) {
output.writeBytes(2, clientTlsCertHash_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!clientIdentity_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, clientIdentity_);
}
if (!clientTlsCertHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, clientTlsCertHash_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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.AuthInfo)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo other = (org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo) obj;
boolean result = true;
result = result && getClientIdentity()
.equals(other.getClientIdentity());
result = result && getClientTlsCertHash()
.equals(other.getClientTlsCertHash());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CLIENT_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getClientIdentity().hashCode();
hash = (37 * hash) + CLIENT_TLS_CERT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getClientTlsCertHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo 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.AuthInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo 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.AuthInfo 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.AuthInfo 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.AuthInfo 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.AuthInfo 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.AuthInfo 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.AuthInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* 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;
}
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) {
}
}
public Builder clear() {
super.clear();
clientIdentity_ = com.google.protobuf.ByteString.EMPTY;
clientTlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_AuthInfo_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.AuthInfo.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
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
*
* 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.
*
* 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.
*
*
* optional bytes client_tls_cert_hash = 2;
*/
public Builder clearClientTlsCertHash() {
clientTlsCertHash_ = getDefaultInstance().getClientTlsCertHash();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@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() {
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;
}
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 {
/**
* optional string channel = 1;
*/
java.lang.String getChannel();
/**
* optional 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.
*
* 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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Query(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
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;
}
}
}
} 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_Query_descriptor;
}
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_;
/**
* optional 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;
}
}
/**
* optional 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.
*
*
* optional .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.
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* optional .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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private QueryResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
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;
}
}
}
} 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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_descriptor;
}
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
*
*
* optional .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.
*
*
* optional .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.
*
*
* optional .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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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_);
}
}
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_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && getResultCase().equals(
other.getResultCase());
if (!result) return false;
switch (resultCase_) {
case 1:
result = result && getError()
.equals(other.getError());
break;
case 2:
result = result && getConfigResult()
.equals(other.getConfigResult());
break;
case 3:
result = result && getCcQueryRes()
.equals(other.getCcQueryRes());
break;
case 4:
result = result && getMembers()
.equals(other.getMembers());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
resultCase_ = 0;
result_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_QueryResult_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.QueryResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.QueryResult.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
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
*
*
* Protobuf type {@code discovery.PeerMembershipQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.PeerMembershipQuery)
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipQuery_descriptor;
}
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);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipQuery_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.getDefaultInstance();
}
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery build() {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery result = new org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery(this);
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery.getDefaultInstance()) return this;
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:discovery.PeerMembershipQuery)
}
// @@protoc_insertion_point(class_scope:discovery.PeerMembershipQuery)
private static final org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery();
}
public static org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public PeerMembershipQuery parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PeerMembershipQuery(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PeerMembershipResultOrBuilder extends
// @@protoc_insertion_point(interface_extends:discovery.PeerMembershipResult)
com.google.protobuf.MessageOrBuilder {
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
int getPeersByOrgCount();
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
boolean containsPeersByOrg(
java.lang.String key);
/**
* Use {@link #getPeersByOrgMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getPeersByOrg();
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
java.util.Map
getPeersByOrgMap();
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrDefault(
java.lang.String key,
org.hyperledger.fabric.protos.discovery.Protocol.Peers defaultValue);
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
org.hyperledger.fabric.protos.discovery.Protocol.Peers getPeersByOrgOrThrow(
java.lang.String key);
}
/**
*
* 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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private PeerMembershipResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
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;
}
}
}
} 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 {
makeExtensionsImmutable();
}
}
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);
}
}
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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (java.util.Map.Entry entry
: internalGetPeersByOrg().getMap().entrySet()) {
com.google.protobuf.MapEntry
peersByOrg = PeersByOrgDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(1, peersByOrg);
}
}
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);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && internalGetPeersByOrg().equals(
other.internalGetPeersByOrg());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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);
}
}
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) {
}
}
public Builder clear() {
super.clear();
internalGetMutablePeersByOrg().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_PeerMembershipResult_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.PeerMembershipResult.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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());
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
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() {
getMutablePeersByOrg().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(); }
getMutablePeersByOrg().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(); }
getMutablePeersByOrg().put(key, value);
return this;
}
/**
* map<string, .discovery.Peers> peers_by_org = 1;
*/
public Builder putAllPeersByOrg(
java.util.Map values) {
getMutablePeersByOrg().putAll(values);
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@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() {
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;
}
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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeQuery(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
interests_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
interests_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeInterest.parser(), extensionRegistry));
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) == 0x00000001)) {
interests_ = java.util.Collections.unmodifiableList(interests_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeQuery_descriptor;
}
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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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));
}
}
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));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && getInterestsList()
.equals(other.getInterestsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeInterest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
chaincodes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
chaincodes_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.ChaincodeCall.parser(), extensionRegistry));
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) == 0x00000001)) {
chaincodes_ = java.util.Collections.unmodifiableList(chaincodes_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_ChaincodeInterest_descriptor;
}
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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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));
}
}
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));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && getChaincodesList()
.equals(other.getChaincodesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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 {
// 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private EndorsementDescriptor(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
chaincode_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
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) == 0x00000004)) {
layouts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
layouts_.add(
input.readMessage(org.hyperledger.fabric.protos.discovery.Protocol.Layout.parser(), extensionRegistry));
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) == 0x00000004)) {
layouts_ = java.util.Collections.unmodifiableList(layouts_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetEndorsersByGroups();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
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_;
/**
* optional 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;
}
}
/**
* optional 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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getChaincodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 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();
output.writeMessage(2, endorsersByGroups);
}
for (int i = 0; i < layouts_.size(); i++) {
output.writeMessage(3, layouts_.get(i));
}
}
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));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@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;
boolean result = true;
result = result && getChaincode()
.equals(other.getChaincode());
result = result && internalGetEndorsersByGroups().equals(
other.internalGetEndorsersByGroups());
result = result && getLayoutsList()
.equals(other.getLayoutsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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
*
*
* Protobuf type {@code discovery.EndorsementDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.EndorsementDescriptor)
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetEndorsersByGroups();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableEndorsersByGroups();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
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);
}
// Construct using org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLayoutsFieldBuilder();
}
}
public Builder clear() {
super.clear();
chaincode_ = "";
internalGetMutableEndorsersByGroups().clear();
if (layoutsBuilder_ == null) {
layouts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
layoutsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.internal_static_discovery_EndorsementDescriptor_descriptor;
}
public org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor.getDefaultInstance();
}
public org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor build() {
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor buildPartial() {
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor result = new org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.chaincode_ = chaincode_;
result.endorsersByGroups_ = internalGetEndorsersByGroups();
result.endorsersByGroups_.makeImmutable();
if (layoutsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
layouts_ = java.util.Collections.unmodifiableList(layouts_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.layouts_ = layouts_;
} else {
result.layouts_ = layoutsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor other) {
if (other == org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor.getDefaultInstance()) return this;
if (!other.getChaincode().isEmpty()) {
chaincode_ = other.chaincode_;
onChanged();
}
internalGetMutableEndorsersByGroups().mergeFrom(
other.internalGetEndorsersByGroups());
if (layoutsBuilder_ == null) {
if (!other.layouts_.isEmpty()) {
if (layouts_.isEmpty()) {
layouts_ = other.layouts_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureLayoutsIsMutable();
layouts_.addAll(other.layouts_);
}
onChanged();
}
} else {
if (!other.layouts_.isEmpty()) {
if (layoutsBuilder_.isEmpty()) {
layoutsBuilder_.dispose();
layoutsBuilder_ = null;
layouts_ = other.layouts_;
bitField0_ = (bitField0_ & ~0x00000004);
layoutsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLayoutsFieldBuilder() : null;
} else {
layoutsBuilder_.addAllMessages(other.layouts_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.discovery.Protocol.EndorsementDescriptor) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object chaincode_ = "";
/**
* optional string chaincode = 1;
*/
public java.lang.String getChaincode() {
java.lang.Object ref = chaincode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
chaincode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string chaincode = 1;
*/
public com.google.protobuf.ByteString
getChaincodeBytes() {
java.lang.Object ref = chaincode_;
if (ref instanceof 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;
}
}
/**
* optional string chaincode = 1;
*/
public Builder setChaincode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
chaincode_ = value;
onChanged();
return this;
}
/**
* optional string chaincode = 1;
*/
public Builder clearChaincode() {
chaincode_ = getDefaultInstance().getChaincode();
onChanged();
return this;
}
/**
* optional string chaincode = 1;
*/
public Builder setChaincodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
chaincode_ = value;
onChanged();
return this;
}
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_;
}
private com.google.protobuf.MapField
internalGetMutableEndorsersByGroups() {
onChanged();;
if (endorsersByGroups_ == null) {
endorsersByGroups_ = com.google.protobuf.MapField.newMapField(
EndorsersByGroupsDefaultEntryHolder.defaultEntry);
}
if (!endorsersByGroups_.isMutable()) {
endorsersByGroups_ = endorsersByGroups_.copy();
}
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();
}
/**
*
* 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) == 0x00000004),
getParentForChildren(),
isClean());
layouts_ = null;
}
return layoutsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@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() {
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;
}
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
*