com.hedera.mirror.api.proto.AddressBookQuery Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mirror_network_service.proto
package com.hedera.mirror.api.proto;
/**
*
**
* Request object to query an address book for its list of nodes
*
*
* Protobuf type {@code com.hedera.mirror.api.proto.AddressBookQuery}
*/
public final class AddressBookQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.mirror.api.proto.AddressBookQuery)
AddressBookQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use AddressBookQuery.newBuilder() to construct.
private AddressBookQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AddressBookQuery() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AddressBookQuery();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AddressBookQuery(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.hederahashgraph.api.proto.java.FileID.Builder subBuilder = null;
if (fileId_ != null) {
subBuilder = fileId_.toBuilder();
}
fileId_ = input.readMessage(com.hederahashgraph.api.proto.java.FileID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fileId_);
fileId_ = subBuilder.buildPartial();
}
break;
}
case 16: {
limit_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.mirror.api.proto.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.mirror.api.proto.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.mirror.api.proto.AddressBookQuery.class, com.hedera.mirror.api.proto.AddressBookQuery.Builder.class);
}
public static final int FILE_ID_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.FileID fileId_;
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
* @return Whether the fileId field is set.
*/
@java.lang.Override
public boolean hasFileId() {
return fileId_ != null;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
* @return The fileId.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FileID getFileId() {
return fileId_ == null ? com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FileIDOrBuilder getFileIdOrBuilder() {
return getFileId();
}
public static final int LIMIT_FIELD_NUMBER = 2;
private int limit_;
/**
*
**
* The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.
*
*
* int32 limit = 2;
* @return The limit.
*/
@java.lang.Override
public int getLimit() {
return limit_;
}
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 (fileId_ != null) {
output.writeMessage(1, getFileId());
}
if (limit_ != 0) {
output.writeInt32(2, limit_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fileId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFileId());
}
if (limit_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, limit_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.mirror.api.proto.AddressBookQuery)) {
return super.equals(obj);
}
com.hedera.mirror.api.proto.AddressBookQuery other = (com.hedera.mirror.api.proto.AddressBookQuery) obj;
if (hasFileId() != other.hasFileId()) return false;
if (hasFileId()) {
if (!getFileId()
.equals(other.getFileId())) return false;
}
if (getLimit()
!= other.getLimit()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFileId()) {
hash = (37 * hash) + FILE_ID_FIELD_NUMBER;
hash = (53 * hash) + getFileId().hashCode();
}
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getLimit();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.mirror.api.proto.AddressBookQuery parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.mirror.api.proto.AddressBookQuery prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
**
* Request object to query an address book for its list of nodes
*
*
* Protobuf type {@code com.hedera.mirror.api.proto.AddressBookQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.mirror.api.proto.AddressBookQuery)
com.hedera.mirror.api.proto.AddressBookQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.mirror.api.proto.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.mirror.api.proto.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.mirror.api.proto.AddressBookQuery.class, com.hedera.mirror.api.proto.AddressBookQuery.Builder.class);
}
// Construct using com.hedera.mirror.api.proto.AddressBookQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (fileIdBuilder_ == null) {
fileId_ = null;
} else {
fileId_ = null;
fileIdBuilder_ = null;
}
limit_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.mirror.api.proto.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
public com.hedera.mirror.api.proto.AddressBookQuery getDefaultInstanceForType() {
return com.hedera.mirror.api.proto.AddressBookQuery.getDefaultInstance();
}
@java.lang.Override
public com.hedera.mirror.api.proto.AddressBookQuery build() {
com.hedera.mirror.api.proto.AddressBookQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.mirror.api.proto.AddressBookQuery buildPartial() {
com.hedera.mirror.api.proto.AddressBookQuery result = new com.hedera.mirror.api.proto.AddressBookQuery(this);
if (fileIdBuilder_ == null) {
result.fileId_ = fileId_;
} else {
result.fileId_ = fileIdBuilder_.build();
}
result.limit_ = limit_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.hedera.mirror.api.proto.AddressBookQuery) {
return mergeFrom((com.hedera.mirror.api.proto.AddressBookQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.mirror.api.proto.AddressBookQuery other) {
if (other == com.hedera.mirror.api.proto.AddressBookQuery.getDefaultInstance()) return this;
if (other.hasFileId()) {
mergeFileId(other.getFileId());
}
if (other.getLimit() != 0) {
setLimit(other.getLimit());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.hedera.mirror.api.proto.AddressBookQuery parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.mirror.api.proto.AddressBookQuery) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.hederahashgraph.api.proto.java.FileID fileId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder> fileIdBuilder_;
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
* @return Whether the fileId field is set.
*/
public boolean hasFileId() {
return fileIdBuilder_ != null || fileId_ != null;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
* @return The fileId.
*/
public com.hederahashgraph.api.proto.java.FileID getFileId() {
if (fileIdBuilder_ == null) {
return fileId_ == null ? com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
} else {
return fileIdBuilder_.getMessage();
}
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public Builder setFileId(com.hederahashgraph.api.proto.java.FileID value) {
if (fileIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileId_ = value;
onChanged();
} else {
fileIdBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public Builder setFileId(
com.hederahashgraph.api.proto.java.FileID.Builder builderForValue) {
if (fileIdBuilder_ == null) {
fileId_ = builderForValue.build();
onChanged();
} else {
fileIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public Builder mergeFileId(com.hederahashgraph.api.proto.java.FileID value) {
if (fileIdBuilder_ == null) {
if (fileId_ != null) {
fileId_ =
com.hederahashgraph.api.proto.java.FileID.newBuilder(fileId_).mergeFrom(value).buildPartial();
} else {
fileId_ = value;
}
onChanged();
} else {
fileIdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public Builder clearFileId() {
if (fileIdBuilder_ == null) {
fileId_ = null;
onChanged();
} else {
fileId_ = null;
fileIdBuilder_ = null;
}
return this;
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public com.hederahashgraph.api.proto.java.FileID.Builder getFileIdBuilder() {
onChanged();
return getFileIdFieldBuilder().getBuilder();
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
public com.hederahashgraph.api.proto.java.FileIDOrBuilder getFileIdOrBuilder() {
if (fileIdBuilder_ != null) {
return fileIdBuilder_.getMessageOrBuilder();
} else {
return fileId_ == null ?
com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
}
}
/**
*
**
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.
*
*
* .proto.FileID file_id = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder>
getFileIdFieldBuilder() {
if (fileIdBuilder_ == null) {
fileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder>(
getFileId(),
getParentForChildren(),
isClean());
fileId_ = null;
}
return fileIdBuilder_;
}
private int limit_ ;
/**
*
**
* The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.
*
*
* int32 limit = 2;
* @return The limit.
*/
@java.lang.Override
public int getLimit() {
return limit_;
}
/**
*
**
* The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.
*
*
* int32 limit = 2;
* @param value The limit to set.
* @return This builder for chaining.
*/
public Builder setLimit(int value) {
limit_ = value;
onChanged();
return this;
}
/**
*
**
* The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.
*
*
* int32 limit = 2;
* @return This builder for chaining.
*/
public Builder clearLimit() {
limit_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:com.hedera.mirror.api.proto.AddressBookQuery)
}
// @@protoc_insertion_point(class_scope:com.hedera.mirror.api.proto.AddressBookQuery)
private static final com.hedera.mirror.api.proto.AddressBookQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.mirror.api.proto.AddressBookQuery();
}
public static com.hedera.mirror.api.proto.AddressBookQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AddressBookQuery parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AddressBookQuery(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.mirror.api.proto.AddressBookQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy