org.hyperledger.fabric.protos.discovery.QueryResult 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;
/**
*
* 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 final class QueryResult extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:discovery.QueryResult)
QueryResultOrBuilder {
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= */ "",
QueryResult.class.getName());
}
// Use QueryResult.newBuilder() to construct.
private QueryResult(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private QueryResult() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_QueryResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.QueryResult.class, org.hyperledger.fabric.protos.discovery.QueryResult.Builder.class);
}
private int resultCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object result_;
public enum ResultCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
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;
}
/**
* @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 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
*
*
* .discovery.Error error = 1 [json_name = "error"];
* @return Whether the error field is set.
*/
@java.lang.Override
public boolean hasError() {
return resultCase_ == 1;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
* @return The error.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Error getError() {
if (resultCase_ == 1) {
return (org.hyperledger.fabric.protos.discovery.Error) result_;
}
return org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ErrorOrBuilder getErrorOrBuilder() {
if (resultCase_ == 1) {
return (org.hyperledger.fabric.protos.discovery.Error) result_;
}
return org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
}
public static final int CONFIG_RESULT_FIELD_NUMBER = 2;
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
* @return Whether the configResult field is set.
*/
@java.lang.Override
public boolean hasConfigResult() {
return resultCase_ == 2;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
* @return The configResult.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigResult getConfigResult() {
if (resultCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigResultOrBuilder getConfigResultOrBuilder() {
if (resultCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
}
public static final int CC_QUERY_RES_FIELD_NUMBER = 3;
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
* @return Whether the ccQueryRes field is set.
*/
@java.lang.Override
public boolean hasCcQueryRes() {
return resultCase_ == 3;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
* @return The ccQueryRes.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult getCcQueryRes() {
if (resultCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryResultOrBuilder getCcQueryResOrBuilder() {
if (resultCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
}
public static final int MEMBERS_FIELD_NUMBER = 4;
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
* @return Whether the members field is set.
*/
@java.lang.Override
public boolean hasMembers() {
return resultCase_ == 4;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
* @return The members.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipResult getMembers() {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipResultOrBuilder getMembersOrBuilder() {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (resultCase_ == 1) {
output.writeMessage(1, (org.hyperledger.fabric.protos.discovery.Error) result_);
}
if (resultCase_ == 2) {
output.writeMessage(2, (org.hyperledger.fabric.protos.discovery.ConfigResult) result_);
}
if (resultCase_ == 3) {
output.writeMessage(3, (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_);
}
if (resultCase_ == 4) {
output.writeMessage(4, (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (resultCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.hyperledger.fabric.protos.discovery.Error) result_);
}
if (resultCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.fabric.protos.discovery.ConfigResult) result_);
}
if (resultCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_);
}
if (resultCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_);
}
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.QueryResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.discovery.QueryResult other = (org.hyperledger.fabric.protos.discovery.QueryResult) obj;
if (!getResultCase().equals(other.getResultCase())) return false;
switch (resultCase_) {
case 1:
if (!getError()
.equals(other.getError())) return false;
break;
case 2:
if (!getConfigResult()
.equals(other.getConfigResult())) return false;
break;
case 3:
if (!getCcQueryRes()
.equals(other.getCcQueryRes())) return false;
break;
case 4:
if (!getMembers()
.equals(other.getMembers())) return false;
break;
case 0:
default:
}
if (!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();
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) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.discovery.QueryResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.QueryResult parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.discovery.QueryResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.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.QueryResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.discovery.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.QueryResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.QueryResult 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.QueryResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.discovery.QueryResult 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.QueryResult 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.QueryResult 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.QueryResult prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:discovery.QueryResult)
org.hyperledger.fabric.protos.discovery.QueryResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_QueryResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.discovery.QueryResult.class, org.hyperledger.fabric.protos.discovery.QueryResult.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.discovery.QueryResult.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (errorBuilder_ != null) {
errorBuilder_.clear();
}
if (configResultBuilder_ != null) {
configResultBuilder_.clear();
}
if (ccQueryResBuilder_ != null) {
ccQueryResBuilder_.clear();
}
if (membersBuilder_ != null) {
membersBuilder_.clear();
}
resultCase_ = 0;
result_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.discovery.ProtocolProto.internal_static_discovery_QueryResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.QueryResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.discovery.QueryResult.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.QueryResult build() {
org.hyperledger.fabric.protos.discovery.QueryResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.QueryResult buildPartial() {
org.hyperledger.fabric.protos.discovery.QueryResult result = new org.hyperledger.fabric.protos.discovery.QueryResult(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.discovery.QueryResult result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(org.hyperledger.fabric.protos.discovery.QueryResult result) {
result.resultCase_ = resultCase_;
result.result_ = this.result_;
if (resultCase_ == 1 &&
errorBuilder_ != null) {
result.result_ = errorBuilder_.build();
}
if (resultCase_ == 2 &&
configResultBuilder_ != null) {
result.result_ = configResultBuilder_.build();
}
if (resultCase_ == 3 &&
ccQueryResBuilder_ != null) {
result.result_ = ccQueryResBuilder_.build();
}
if (resultCase_ == 4 &&
membersBuilder_ != null) {
result.result_ = membersBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.discovery.QueryResult) {
return mergeFrom((org.hyperledger.fabric.protos.discovery.QueryResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.discovery.QueryResult other) {
if (other == org.hyperledger.fabric.protos.discovery.QueryResult.getDefaultInstance()) return this;
switch (other.getResultCase()) {
case ERROR: {
mergeError(other.getError());
break;
}
case CONFIG_RESULT: {
mergeConfigResult(other.getConfigResult());
break;
}
case CC_QUERY_RES: {
mergeCcQueryRes(other.getCcQueryRes());
break;
}
case MEMBERS: {
mergeMembers(other.getMembers());
break;
}
case RESULT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.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: {
input.readMessage(
getErrorFieldBuilder().getBuilder(),
extensionRegistry);
resultCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getConfigResultFieldBuilder().getBuilder(),
extensionRegistry);
resultCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getCcQueryResFieldBuilder().getBuilder(),
extensionRegistry);
resultCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getMembersFieldBuilder().getBuilder(),
extensionRegistry);
resultCase_ = 4;
break;
} // case 34
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 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 int bitField0_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.Error, org.hyperledger.fabric.protos.discovery.Error.Builder, org.hyperledger.fabric.protos.discovery.ErrorOrBuilder> errorBuilder_;
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
* @return Whether the error field is set.
*/
@java.lang.Override
public boolean hasError() {
return resultCase_ == 1;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
* @return The error.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.Error getError() {
if (errorBuilder_ == null) {
if (resultCase_ == 1) {
return (org.hyperledger.fabric.protos.discovery.Error) result_;
}
return org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
} else {
if (resultCase_ == 1) {
return errorBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
}
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
public Builder setError(org.hyperledger.fabric.protos.discovery.Error value) {
if (errorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
onChanged();
} else {
errorBuilder_.setMessage(value);
}
resultCase_ = 1;
return this;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
public Builder setError(
org.hyperledger.fabric.protos.discovery.Error.Builder builderForValue) {
if (errorBuilder_ == null) {
result_ = builderForValue.build();
onChanged();
} else {
errorBuilder_.setMessage(builderForValue.build());
}
resultCase_ = 1;
return this;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
public Builder mergeError(org.hyperledger.fabric.protos.discovery.Error value) {
if (errorBuilder_ == null) {
if (resultCase_ == 1 &&
result_ != org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance()) {
result_ = org.hyperledger.fabric.protos.discovery.Error.newBuilder((org.hyperledger.fabric.protos.discovery.Error) result_)
.mergeFrom(value).buildPartial();
} else {
result_ = value;
}
onChanged();
} else {
if (resultCase_ == 1) {
errorBuilder_.mergeFrom(value);
} else {
errorBuilder_.setMessage(value);
}
}
resultCase_ = 1;
return this;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
public Builder clearError() {
if (errorBuilder_ == null) {
if (resultCase_ == 1) {
resultCase_ = 0;
result_ = null;
onChanged();
}
} else {
if (resultCase_ == 1) {
resultCase_ = 0;
result_ = null;
}
errorBuilder_.clear();
}
return this;
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
public org.hyperledger.fabric.protos.discovery.Error.Builder getErrorBuilder() {
return getErrorFieldBuilder().getBuilder();
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ErrorOrBuilder getErrorOrBuilder() {
if ((resultCase_ == 1) && (errorBuilder_ != null)) {
return errorBuilder_.getMessageOrBuilder();
} else {
if (resultCase_ == 1) {
return (org.hyperledger.fabric.protos.discovery.Error) result_;
}
return org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
}
}
/**
*
* Error indicates failure or refusal to process the query
*
*
* .discovery.Error error = 1 [json_name = "error"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.Error, org.hyperledger.fabric.protos.discovery.Error.Builder, org.hyperledger.fabric.protos.discovery.ErrorOrBuilder>
getErrorFieldBuilder() {
if (errorBuilder_ == null) {
if (!(resultCase_ == 1)) {
result_ = org.hyperledger.fabric.protos.discovery.Error.getDefaultInstance();
}
errorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.Error, org.hyperledger.fabric.protos.discovery.Error.Builder, org.hyperledger.fabric.protos.discovery.ErrorOrBuilder>(
(org.hyperledger.fabric.protos.discovery.Error) result_,
getParentForChildren(),
isClean());
result_ = null;
}
resultCase_ = 1;
onChanged();
return errorBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigResult, org.hyperledger.fabric.protos.discovery.ConfigResult.Builder, org.hyperledger.fabric.protos.discovery.ConfigResultOrBuilder> configResultBuilder_;
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
* @return Whether the configResult field is set.
*/
@java.lang.Override
public boolean hasConfigResult() {
return resultCase_ == 2;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
* @return The configResult.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigResult getConfigResult() {
if (configResultBuilder_ == null) {
if (resultCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
} else {
if (resultCase_ == 2) {
return configResultBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
}
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
public Builder setConfigResult(org.hyperledger.fabric.protos.discovery.ConfigResult value) {
if (configResultBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
onChanged();
} else {
configResultBuilder_.setMessage(value);
}
resultCase_ = 2;
return this;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
public Builder setConfigResult(
org.hyperledger.fabric.protos.discovery.ConfigResult.Builder builderForValue) {
if (configResultBuilder_ == null) {
result_ = builderForValue.build();
onChanged();
} else {
configResultBuilder_.setMessage(builderForValue.build());
}
resultCase_ = 2;
return this;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
public Builder mergeConfigResult(org.hyperledger.fabric.protos.discovery.ConfigResult value) {
if (configResultBuilder_ == null) {
if (resultCase_ == 2 &&
result_ != org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance()) {
result_ = org.hyperledger.fabric.protos.discovery.ConfigResult.newBuilder((org.hyperledger.fabric.protos.discovery.ConfigResult) result_)
.mergeFrom(value).buildPartial();
} else {
result_ = value;
}
onChanged();
} else {
if (resultCase_ == 2) {
configResultBuilder_.mergeFrom(value);
} else {
configResultBuilder_.setMessage(value);
}
}
resultCase_ = 2;
return this;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
public Builder clearConfigResult() {
if (configResultBuilder_ == null) {
if (resultCase_ == 2) {
resultCase_ = 0;
result_ = null;
onChanged();
}
} else {
if (resultCase_ == 2) {
resultCase_ = 0;
result_ = null;
}
configResultBuilder_.clear();
}
return this;
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
public org.hyperledger.fabric.protos.discovery.ConfigResult.Builder getConfigResultBuilder() {
return getConfigResultFieldBuilder().getBuilder();
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ConfigResultOrBuilder getConfigResultOrBuilder() {
if ((resultCase_ == 2) && (configResultBuilder_ != null)) {
return configResultBuilder_.getMessageOrBuilder();
} else {
if (resultCase_ == 2) {
return (org.hyperledger.fabric.protos.discovery.ConfigResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
}
}
/**
*
* ConfigResult contains the configuration of the channel,
* such as FabricMSPConfig and orderer endpoints
*
*
* .discovery.ConfigResult config_result = 2 [json_name = "configResult"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigResult, org.hyperledger.fabric.protos.discovery.ConfigResult.Builder, org.hyperledger.fabric.protos.discovery.ConfigResultOrBuilder>
getConfigResultFieldBuilder() {
if (configResultBuilder_ == null) {
if (!(resultCase_ == 2)) {
result_ = org.hyperledger.fabric.protos.discovery.ConfigResult.getDefaultInstance();
}
configResultBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ConfigResult, org.hyperledger.fabric.protos.discovery.ConfigResult.Builder, org.hyperledger.fabric.protos.discovery.ConfigResultOrBuilder>(
(org.hyperledger.fabric.protos.discovery.ConfigResult) result_,
getParentForChildren(),
isClean());
result_ = null;
}
resultCase_ = 2;
onChanged();
return configResultBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResultOrBuilder> ccQueryResBuilder_;
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
* @return Whether the ccQueryRes field is set.
*/
@java.lang.Override
public boolean hasCcQueryRes() {
return resultCase_ == 3;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
* @return The ccQueryRes.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult getCcQueryRes() {
if (ccQueryResBuilder_ == null) {
if (resultCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
} else {
if (resultCase_ == 3) {
return ccQueryResBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
}
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
public Builder setCcQueryRes(org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult value) {
if (ccQueryResBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
onChanged();
} else {
ccQueryResBuilder_.setMessage(value);
}
resultCase_ = 3;
return this;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
public Builder setCcQueryRes(
org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.Builder builderForValue) {
if (ccQueryResBuilder_ == null) {
result_ = builderForValue.build();
onChanged();
} else {
ccQueryResBuilder_.setMessage(builderForValue.build());
}
resultCase_ = 3;
return this;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
public Builder mergeCcQueryRes(org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult value) {
if (ccQueryResBuilder_ == null) {
if (resultCase_ == 3 &&
result_ != org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance()) {
result_ = org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.newBuilder((org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_)
.mergeFrom(value).buildPartial();
} else {
result_ = value;
}
onChanged();
} else {
if (resultCase_ == 3) {
ccQueryResBuilder_.mergeFrom(value);
} else {
ccQueryResBuilder_.setMessage(value);
}
}
resultCase_ = 3;
return this;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
public Builder clearCcQueryRes() {
if (ccQueryResBuilder_ == null) {
if (resultCase_ == 3) {
resultCase_ = 0;
result_ = null;
onChanged();
}
} else {
if (resultCase_ == 3) {
resultCase_ = 0;
result_ = null;
}
ccQueryResBuilder_.clear();
}
return this;
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.Builder getCcQueryResBuilder() {
return getCcQueryResFieldBuilder().getBuilder();
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.ChaincodeQueryResultOrBuilder getCcQueryResOrBuilder() {
if ((resultCase_ == 3) && (ccQueryResBuilder_ != null)) {
return ccQueryResBuilder_.getMessageOrBuilder();
} else {
if (resultCase_ == 3) {
return (org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_;
}
return org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
}
}
/**
*
* ChaincodeQueryResult contains information about chaincodes,
* and their corresponding endorsers
*
*
* .discovery.ChaincodeQueryResult cc_query_res = 3 [json_name = "ccQueryRes"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResultOrBuilder>
getCcQueryResFieldBuilder() {
if (ccQueryResBuilder_ == null) {
if (!(resultCase_ == 3)) {
result_ = org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.getDefaultInstance();
}
ccQueryResBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult.Builder, org.hyperledger.fabric.protos.discovery.ChaincodeQueryResultOrBuilder>(
(org.hyperledger.fabric.protos.discovery.ChaincodeQueryResult) result_,
getParentForChildren(),
isClean());
result_ = null;
}
resultCase_ = 3;
onChanged();
return ccQueryResBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipResult, org.hyperledger.fabric.protos.discovery.PeerMembershipResult.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipResultOrBuilder> membersBuilder_;
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
* @return Whether the members field is set.
*/
@java.lang.Override
public boolean hasMembers() {
return resultCase_ == 4;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
* @return The members.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipResult getMembers() {
if (membersBuilder_ == null) {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
} else {
if (resultCase_ == 4) {
return membersBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
}
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
public Builder setMembers(org.hyperledger.fabric.protos.discovery.PeerMembershipResult value) {
if (membersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
onChanged();
} else {
membersBuilder_.setMessage(value);
}
resultCase_ = 4;
return this;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
public Builder setMembers(
org.hyperledger.fabric.protos.discovery.PeerMembershipResult.Builder builderForValue) {
if (membersBuilder_ == null) {
result_ = builderForValue.build();
onChanged();
} else {
membersBuilder_.setMessage(builderForValue.build());
}
resultCase_ = 4;
return this;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
public Builder mergeMembers(org.hyperledger.fabric.protos.discovery.PeerMembershipResult value) {
if (membersBuilder_ == null) {
if (resultCase_ == 4 &&
result_ != org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance()) {
result_ = org.hyperledger.fabric.protos.discovery.PeerMembershipResult.newBuilder((org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_)
.mergeFrom(value).buildPartial();
} else {
result_ = value;
}
onChanged();
} else {
if (resultCase_ == 4) {
membersBuilder_.mergeFrom(value);
} else {
membersBuilder_.setMessage(value);
}
}
resultCase_ = 4;
return this;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
public Builder clearMembers() {
if (membersBuilder_ == null) {
if (resultCase_ == 4) {
resultCase_ = 0;
result_ = null;
onChanged();
}
} else {
if (resultCase_ == 4) {
resultCase_ = 0;
result_ = null;
}
membersBuilder_.clear();
}
return this;
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
public org.hyperledger.fabric.protos.discovery.PeerMembershipResult.Builder getMembersBuilder() {
return getMembersFieldBuilder().getBuilder();
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.discovery.PeerMembershipResultOrBuilder getMembersOrBuilder() {
if ((resultCase_ == 4) && (membersBuilder_ != null)) {
return membersBuilder_.getMessageOrBuilder();
} else {
if (resultCase_ == 4) {
return (org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_;
}
return org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
}
}
/**
*
* PeerMembershipResult contains information about peers,
* such as their identity, endpoints, and channel related state.
*
*
* .discovery.PeerMembershipResult members = 4 [json_name = "members"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipResult, org.hyperledger.fabric.protos.discovery.PeerMembershipResult.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipResultOrBuilder>
getMembersFieldBuilder() {
if (membersBuilder_ == null) {
if (!(resultCase_ == 4)) {
result_ = org.hyperledger.fabric.protos.discovery.PeerMembershipResult.getDefaultInstance();
}
membersBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.discovery.PeerMembershipResult, org.hyperledger.fabric.protos.discovery.PeerMembershipResult.Builder, org.hyperledger.fabric.protos.discovery.PeerMembershipResultOrBuilder>(
(org.hyperledger.fabric.protos.discovery.PeerMembershipResult) result_,
getParentForChildren(),
isClean());
result_ = null;
}
resultCase_ = 4;
onChanged();
return membersBuilder_;
}
// @@protoc_insertion_point(builder_scope:discovery.QueryResult)
}
// @@protoc_insertion_point(class_scope:discovery.QueryResult)
private static final org.hyperledger.fabric.protos.discovery.QueryResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.discovery.QueryResult();
}
public static org.hyperledger.fabric.protos.discovery.QueryResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryResult 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.QueryResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy