org.hyperledger.fabric.protos.discovery.Query Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: discovery/protocol.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.discovery;
/**
*
* Query asks for information in the context of a specific channel
*
*
* Protobuf type {@code discovery.Query}
*/
public final class Query extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:discovery.Query)
QueryOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Query.class.getName());
}
// Use Query.newBuilder() to construct.
private Query(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Query() {
channel_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_Query_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_Query_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Query.class, org.hyperledger.fabric.protos.discovery.Query.Builder.class);
}
private int queryCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object query_;
public enum QueryCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
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;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @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;
@SuppressWarnings("serial")
private volatile java.lang.Object channel_ = "";
/**
* string channel = 1 [json_name = "channel"];
* @return The channel.
*/
@java.lang.Override
public java.lang.String getChannel() {
java.lang.Object ref = channel_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channel_ = s;
return s;
}
}
/**
* string channel = 1 [json_name = "channel"];
* @return The bytes for channel.
*/
@java.lang.Override
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.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
* @return Whether the configQuery field is set.
*/
@java.lang.Override
public boolean hasConfigQuery() {
return queryCase_ == 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.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
* @return The configQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigQuery getConfigQuery() {
if (queryCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigQueryOrBuilder getConfigQueryOrBuilder() {
if (queryCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
}
public static final int PEER_QUERY_FIELD_NUMBER = 3;
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
* @return Whether the peerQuery field is set.
*/
@java.lang.Override
public boolean hasPeerQuery() {
return queryCase_ == 3;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
* @return The peerQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipQuery getPeerQuery() {
if (queryCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipQueryOrBuilder getPeerQueryOrBuilder() {
if (queryCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
}
public static final int CC_QUERY_FIELD_NUMBER = 4;
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
* @return Whether the ccQuery field is set.
*/
@java.lang.Override
public boolean hasCcQuery() {
return queryCase_ == 4;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
* @return The ccQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQuery getCcQuery() {
if (queryCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryOrBuilder getCcQueryOrBuilder() {
if (queryCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
}
public static final int LOCAL_PEERS_FIELD_NUMBER = 5;
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
* @return Whether the localPeers field is set.
*/
@java.lang.Override
public boolean hasLocalPeers() {
return queryCase_ == 5;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
* @return The localPeers.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.LocalPeerQuery getLocalPeers() {
if (queryCase_ == 5) {
return (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.LocalPeerQueryOrBuilder getLocalPeersOrBuilder() {
if (queryCase_ == 5) {
return (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channel_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, channel_);
}
if (queryCase_ == 2) {
output.writeMessage(2, (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_);
}
if (queryCase_ == 3) {
output.writeMessage(3, (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_);
}
if (queryCase_ == 4) {
output.writeMessage(4, (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_);
}
if (queryCase_ == 5) {
output.writeMessage(5, (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channel_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channel_);
}
if (queryCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_);
}
if (queryCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_);
}
if (queryCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_);
}
if (queryCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.discovery.Query)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.Query other = (org.hyperledger.fabric.protos.discovery.Query) obj;
if (!getChannel()
.equals(other.getChannel())) return false;
if (!getQueryCase().equals(other.getQueryCase())) return false;
switch (queryCase_) {
case 2:
if (!getConfigQuery()
.equals(other.getConfigQuery())) return false;
break;
case 3:
if (!getPeerQuery()
.equals(other.getPeerQuery())) return false;
break;
case 4:
if (!getCcQuery()
.equals(other.getCcQuery())) return false;
break;
case 5:
if (!getLocalPeers()
.equals(other.getLocalPeers())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CHANNEL_FIELD_NUMBER;
hash = (53 * hash) + getChannel().hashCode();
switch (queryCase_) {
case 2:
hash = (37 * hash) + CONFIG_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getConfigQuery().hashCode();
break;
case 3:
hash = (37 * hash) + PEER_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getPeerQuery().hashCode();
break;
case 4:
hash = (37 * hash) + CC_QUERY_FIELD_NUMBER;
hash = (53 * hash) + getCcQuery().hashCode();
break;
case 5:
hash = (37 * hash) + LOCAL_PEERS_FIELD_NUMBER;
hash = (53 * hash) + getLocalPeers().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Query 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.Query parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.Query 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.Query parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Query parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Query parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.Query parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.discovery.Query prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Query asks for information in the context of a specific channel
*
*
* Protobuf type {@code discovery.Query}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.Query)
org.hyperledger.fabric.protos.discovery.QueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_Query_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_Query_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.Query.class, org.hyperledger.fabric.protos.discovery.Query.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.Query.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
channel_ = "";
if (configQueryBuilder_ != null) {
configQueryBuilder_.clear();
}
if (peerQueryBuilder_ != null) {
peerQueryBuilder_.clear();
}
if (ccQueryBuilder_ != null) {
ccQueryBuilder_.clear();
}
if (localPeersBuilder_ != null) {
localPeersBuilder_.clear();
}
queryCase_ = 0;
query_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_Query_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Query getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.Query.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Query build() {
org.hyperledger.fabric.protos.discovery.Query result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Query buildPartial() {
org.hyperledger.fabric.protos.discovery.Query result = new org.hyperledger.fabric.protos.discovery.Query(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.discovery.Query result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.channel_ = channel_;
}
}
private void buildPartialOneofs(org.hyperledger.fabric.protos.discovery.Query result) {
result.queryCase_ = queryCase_;
result.query_ = this.query_;
if (queryCase_ == 2 &&
configQueryBuilder_ != null) {
result.query_ = configQueryBuilder_.build();
}
if (queryCase_ == 3 &&
peerQueryBuilder_ != null) {
result.query_ = peerQueryBuilder_.build();
}
if (queryCase_ == 4 &&
ccQueryBuilder_ != null) {
result.query_ = ccQueryBuilder_.build();
}
if (queryCase_ == 5 &&
localPeersBuilder_ != null) {
result.query_ = localPeersBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.discovery.Query) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.Query)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.Query other) {
if (other == org.hyperledger.fabric.protos.discovery.Query.getDefaultInstance()) return this;
if (!other.getChannel().isEmpty()) {
channel_ = other.channel_;
bitField0_ |= 0x00000001;
onChanged();
}
switch (other.getQueryCase()) {
case CONFIG_QUERY: {
mergeConfigQuery(other.getConfigQuery());
break;
}
case PEER_QUERY: {
mergePeerQuery(other.getPeerQuery());
break;
}
case CC_QUERY: {
mergeCcQuery(other.getCcQuery());
break;
}
case LOCAL_PEERS: {
mergeLocalPeers(other.getLocalPeers());
break;
}
case QUERY_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
channel_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getConfigQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getPeerQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getCcQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 4;
break;
} // case 34
case 42: {
input.readMessage(
getLocalPeersFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 5;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int queryCase_ = 0;
private java.lang.Object query_;
public QueryCase
getQueryCase() {
return QueryCase.forNumber(
queryCase_);
}
public Builder clearQuery() {
queryCase_ = 0;
query_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object channel_ = "";
/**
* string channel = 1 [json_name = "channel"];
* @return The channel.
*/
public java.lang.String getChannel() {
java.lang.Object ref = channel_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channel_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string channel = 1 [json_name = "channel"];
* @return The bytes for channel.
*/
public com.google.protobuf.ByteString
getChannelBytes() {
java.lang.Object ref = channel_;
if (ref instanceof 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;
}
}
/**
* string channel = 1 [json_name = "channel"];
* @param value The channel to set.
* @return This builder for chaining.
*/
public Builder setChannel(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
channel_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string channel = 1 [json_name = "channel"];
* @return This builder for chaining.
*/
public Builder clearChannel() {
channel_ = getDefaultInstance().getChannel();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string channel = 1 [json_name = "channel"];
* @param value The bytes for channel to set.
* @return This builder for chaining.
*/
public Builder setChannelBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
channel_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigQuery, org.hyperledger.fabric.protos.discovery.ConfigQuery.Builder, org.hyperledger.fabric.protos.discovery.ConfigQueryOrBuilder> configQueryBuilder_;
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
* @return Whether the configQuery field is set.
*/
@java.lang.Override
public boolean hasConfigQuery() {
return queryCase_ == 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.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
* @return The configQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigQuery getConfigQuery() {
if (configQueryBuilder_ == null) {
if (queryCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
} else {
if (queryCase_ == 2) {
return configQueryBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
}
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
public Builder setConfigQuery(org.hyperledger.fabric.protos.discovery.ConfigQuery value) {
if (configQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
configQueryBuilder_.setMessage(value);
}
queryCase_ = 2;
return this;
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
public Builder setConfigQuery(
org.hyperledger.fabric.protos.discovery.ConfigQuery.Builder builderForValue) {
if (configQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
configQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 2;
return this;
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
public Builder mergeConfigQuery(org.hyperledger.fabric.protos.discovery.ConfigQuery value) {
if (configQueryBuilder_ == null) {
if (queryCase_ == 2 &&
query_ != org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance()) {
query_ = org.hyperledger.fabric.protos.discovery.ConfigQuery.newBuilder((org.hyperledger.fabric.protos.discovery.ConfigQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 2) {
configQueryBuilder_.mergeFrom(value);
} else {
configQueryBuilder_.setMessage(value);
}
}
queryCase_ = 2;
return this;
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
public Builder clearConfigQuery() {
if (configQueryBuilder_ == null) {
if (queryCase_ == 2) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 2) {
queryCase_ = 0;
query_ = null;
}
configQueryBuilder_.clear();
}
return this;
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
public org.hyperledger.fabric.protos.discovery.ConfigQuery.Builder getConfigQueryBuilder() {
return getConfigQueryFieldBuilder().getBuilder();
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigQueryOrBuilder getConfigQueryOrBuilder() {
if ((queryCase_ == 2) && (configQueryBuilder_ != null)) {
return configQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
}
}
/**
*
* ConfigQuery is used to query for the configuration of the channel,
* such as FabricMSPConfig, and rorderer endpoints.
* The client has to query a peer it trusts as it doesn't have means to self-verify
* the authenticity of the returned result.
* The result is returned in the form of ConfigResult.
*
*
* .discovery.ConfigQuery config_query = 2 [json_name = "configQuery"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigQuery, org.hyperledger.fabric.protos.discovery.ConfigQuery.Builder, org.hyperledger.fabric.protos.discovery.ConfigQueryOrBuilder>
getConfigQueryFieldBuilder() {
if (configQueryBuilder_ == null) {
if (!(queryCase_ == 2)) {
query_ = org.hyperledger.fabric.protos.discovery.ConfigQuery.getDefaultInstance();
}
configQueryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigQuery, org.hyperledger.fabric.protos.discovery.ConfigQuery.Builder, org.hyperledger.fabric.protos.discovery.ConfigQueryOrBuilder>(
(org.hyperledger.fabric.protos.discovery.ConfigQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 2;
onChanged();
return configQueryBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipQuery, org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipQueryOrBuilder> peerQueryBuilder_;
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
* @return Whether the peerQuery field is set.
*/
@java.lang.Override
public boolean hasPeerQuery() {
return queryCase_ == 3;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
* @return The peerQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipQuery getPeerQuery() {
if (peerQueryBuilder_ == null) {
if (queryCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
} else {
if (queryCase_ == 3) {
return peerQueryBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
}
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
public Builder setPeerQuery(org.hyperledger.fabric.protos.discovery.PeerMembershipQuery value) {
if (peerQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
peerQueryBuilder_.setMessage(value);
}
queryCase_ = 3;
return this;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
public Builder setPeerQuery(
org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.Builder builderForValue) {
if (peerQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
peerQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 3;
return this;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
public Builder mergePeerQuery(org.hyperledger.fabric.protos.discovery.PeerMembershipQuery value) {
if (peerQueryBuilder_ == null) {
if (queryCase_ == 3 &&
query_ != org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance()) {
query_ = org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.newBuilder((org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 3) {
peerQueryBuilder_.mergeFrom(value);
} else {
peerQueryBuilder_.setMessage(value);
}
}
queryCase_ = 3;
return this;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
public Builder clearPeerQuery() {
if (peerQueryBuilder_ == null) {
if (queryCase_ == 3) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 3) {
queryCase_ = 0;
query_ = null;
}
peerQueryBuilder_.clear();
}
return this;
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
public org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.Builder getPeerQueryBuilder() {
return getPeerQueryFieldBuilder().getBuilder();
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipQueryOrBuilder getPeerQueryOrBuilder() {
if ((queryCase_ == 3) && (peerQueryBuilder_ != null)) {
return peerQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
}
}
/**
*
* PeerMembershipQuery queries for peers in a channel context,
* and returns PeerMembershipResult
*
*
* .discovery.PeerMembershipQuery peer_query = 3 [json_name = "peerQuery"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipQuery, org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipQueryOrBuilder>
getPeerQueryFieldBuilder() {
if (peerQueryBuilder_ == null) {
if (!(queryCase_ == 3)) {
query_ = org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.getDefaultInstance();
}
peerQueryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipQuery, org.hyperledger.fabric.protos.discovery.PeerMembershipQuery.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipQueryOrBuilder>(
(org.hyperledger.fabric.protos.discovery.PeerMembershipQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 3;
onChanged();
return peerQueryBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQuery, org.hyperledger.fabric.protos.discovery.ChaincodeQuery.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryOrBuilder> ccQueryBuilder_;
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
* @return Whether the ccQuery field is set.
*/
@java.lang.Override
public boolean hasCcQuery() {
return queryCase_ == 4;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
* @return The ccQuery.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQuery getCcQuery() {
if (ccQueryBuilder_ == null) {
if (queryCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
} else {
if (queryCase_ == 4) {
return ccQueryBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
}
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
public Builder setCcQuery(org.hyperledger.fabric.protos.discovery.ChaincodeQuery value) {
if (ccQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
ccQueryBuilder_.setMessage(value);
}
queryCase_ = 4;
return this;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
public Builder setCcQuery(
org.hyperledger.fabric.protos.discovery.ChaincodeQuery.Builder builderForValue) {
if (ccQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
ccQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 4;
return this;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
public Builder mergeCcQuery(org.hyperledger.fabric.protos.discovery.ChaincodeQuery value) {
if (ccQueryBuilder_ == null) {
if (queryCase_ == 4 &&
query_ != org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance()) {
query_ = org.hyperledger.fabric.protos.discovery.ChaincodeQuery.newBuilder((org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 4) {
ccQueryBuilder_.mergeFrom(value);
} else {
ccQueryBuilder_.setMessage(value);
}
}
queryCase_ = 4;
return this;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
public Builder clearCcQuery() {
if (ccQueryBuilder_ == null) {
if (queryCase_ == 4) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 4) {
queryCase_ = 0;
query_ = null;
}
ccQueryBuilder_.clear();
}
return this;
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
public org.hyperledger.fabric.protos.discovery.ChaincodeQuery.Builder getCcQueryBuilder() {
return getCcQueryFieldBuilder().getBuilder();
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryOrBuilder getCcQueryOrBuilder() {
if ((queryCase_ == 4) && (ccQueryBuilder_ != null)) {
return ccQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
}
}
/**
*
* ChaincodeQuery queries for chaincodes by their name and version.
* An empty version means any version can by returned.
*
*
* .discovery.ChaincodeQuery cc_query = 4 [json_name = "ccQuery"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQuery, org.hyperledger.fabric.protos.discovery.ChaincodeQuery.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryOrBuilder>
getCcQueryFieldBuilder() {
if (ccQueryBuilder_ == null) {
if (!(queryCase_ == 4)) {
query_ = org.hyperledger.fabric.protos.discovery.ChaincodeQuery.getDefaultInstance();
}
ccQueryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQuery, org.hyperledger.fabric.protos.discovery.ChaincodeQuery.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryOrBuilder>(
(org.hyperledger.fabric.protos.discovery.ChaincodeQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 4;
onChanged();
return ccQueryBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.LocalPeerQuery, org.hyperledger.fabric.protos.discovery.LocalPeerQuery.Builder, org.hyperledger.fabric.protos.discovery.LocalPeerQueryOrBuilder> localPeersBuilder_;
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
* @return Whether the localPeers field is set.
*/
@java.lang.Override
public boolean hasLocalPeers() {
return queryCase_ == 5;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
* @return The localPeers.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.LocalPeerQuery getLocalPeers() {
if (localPeersBuilder_ == null) {
if (queryCase_ == 5) {
return (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
} else {
if (queryCase_ == 5) {
return localPeersBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
}
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
public Builder setLocalPeers(org.hyperledger.fabric.protos.discovery.LocalPeerQuery value) {
if (localPeersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
localPeersBuilder_.setMessage(value);
}
queryCase_ = 5;
return this;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
public Builder setLocalPeers(
org.hyperledger.fabric.protos.discovery.LocalPeerQuery.Builder builderForValue) {
if (localPeersBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
localPeersBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 5;
return this;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
public Builder mergeLocalPeers(org.hyperledger.fabric.protos.discovery.LocalPeerQuery value) {
if (localPeersBuilder_ == null) {
if (queryCase_ == 5 &&
query_ != org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance()) {
query_ = org.hyperledger.fabric.protos.discovery.LocalPeerQuery.newBuilder((org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 5) {
localPeersBuilder_.mergeFrom(value);
} else {
localPeersBuilder_.setMessage(value);
}
}
queryCase_ = 5;
return this;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
public Builder clearLocalPeers() {
if (localPeersBuilder_ == null) {
if (queryCase_ == 5) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 5) {
queryCase_ = 0;
query_ = null;
}
localPeersBuilder_.clear();
}
return this;
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
public org.hyperledger.fabric.protos.discovery.LocalPeerQuery.Builder getLocalPeersBuilder() {
return getLocalPeersFieldBuilder().getBuilder();
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.LocalPeerQueryOrBuilder getLocalPeersOrBuilder() {
if ((queryCase_ == 5) && (localPeersBuilder_ != null)) {
return localPeersBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 5) {
return (org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_;
}
return org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
}
}
/**
*
* LocalPeerQuery queries for peers in a non channel context,
* and returns PeerMembershipResult
*
*
* .discovery.LocalPeerQuery local_peers = 5 [json_name = "localPeers"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.LocalPeerQuery, org.hyperledger.fabric.protos.discovery.LocalPeerQuery.Builder, org.hyperledger.fabric.protos.discovery.LocalPeerQueryOrBuilder>
getLocalPeersFieldBuilder() {
if (localPeersBuilder_ == null) {
if (!(queryCase_ == 5)) {
query_ = org.hyperledger.fabric.protos.discovery.LocalPeerQuery.getDefaultInstance();
}
localPeersBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.LocalPeerQuery, org.hyperledger.fabric.protos.discovery.LocalPeerQuery.Builder, org.hyperledger.fabric.protos.discovery.LocalPeerQueryOrBuilder>(
(org.hyperledger.fabric.protos.discovery.LocalPeerQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 5;
onChanged();
return localPeersBuilder_;
}
// @@protoc_insertion_point(builder_scope:discovery.Query)
}
// @@protoc_insertion_point(class_scope:discovery.Query)
private static final org.hyperledger.fabric.protos.discovery.Query DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.Query();
}
public static org.hyperledger.fabric.protos.discovery.Query getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Query parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Query getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy