com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mirror/mirror_network_service.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto.mirror;
/**
*
**
* 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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.mirror.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.mirror.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.class, com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.Builder.class);
}
private int bitField0_;
public static final int FILE_ID_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* 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.hedera.hashgraph.sdk.proto.FileID getFileId() {
return fileId_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FileIDOrBuilder getFileIdOrBuilder() {
return fileId_ == null ? com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance() : fileId_;
}
public static final int LIMIT_FIELD_NUMBER = 2;
private int limit_ = 0;
/**
*
**
* 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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getFileId());
}
if (limit_ != 0) {
output.writeInt32(2, limit_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFileId());
}
if (limit_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, limit_);
}
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 com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery other = (com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery) obj;
if (hasFileId() != other.hasFileId()) return false;
if (hasFileId()) {
if (!getFileId()
.equals(other.getFileId())) return false;
}
if (getLimit()
!= other.getLimit()) return false;
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();
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) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.AddressBookQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.AddressBookQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.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.hashgraph.sdk.proto.mirror.AddressBookQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.mirror.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.mirror.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.class, com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.mirror.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) {
getFileIdFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fileId_ = null;
if (fileIdBuilder_ != null) {
fileIdBuilder_.dispose();
fileIdBuilder_ = null;
}
limit_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.mirror.MirrorNetworkService.internal_static_com_hedera_mirror_api_proto_AddressBookQuery_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery build() {
com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery buildPartial() {
com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery result = new com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fileId_ = fileIdBuilder_ == null
? fileId_
: fileIdBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.limit_ = limit_;
}
result.bitField0_ |= to_bitField0_;
}
@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.hashgraph.sdk.proto.mirror.AddressBookQuery) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery other) {
if (other == com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery.getDefaultInstance()) return this;
if (other.hasFileId()) {
mergeFileId(other.getFileId());
}
if (other.getLimit() != 0) {
setLimit(other.getLimit());
}
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(
getFileIdFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
limit_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
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 bitField0_;
private com.hedera.hashgraph.sdk.proto.FileID fileId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* 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.hedera.hashgraph.sdk.proto.FileID getFileId() {
if (fileIdBuilder_ == null) {
return fileId_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FileID value) {
if (fileIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileId_ = value;
} else {
fileIdBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
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.hedera.hashgraph.sdk.proto.FileID.Builder builderForValue) {
if (fileIdBuilder_ == null) {
fileId_ = builderForValue.build();
} else {
fileIdBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
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.hedera.hashgraph.sdk.proto.FileID value) {
if (fileIdBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
fileId_ != null &&
fileId_ != com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance()) {
getFileIdBuilder().mergeFrom(value);
} else {
fileId_ = value;
}
} else {
fileIdBuilder_.mergeFrom(value);
}
if (fileId_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
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() {
bitField0_ = (bitField0_ & ~0x00000001);
fileId_ = null;
if (fileIdBuilder_ != null) {
fileIdBuilder_.dispose();
fileIdBuilder_ = null;
}
onChanged();
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.hedera.hashgraph.sdk.proto.FileID.Builder getFileIdBuilder() {
bitField0_ |= 0x00000001;
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.hedera.hashgraph.sdk.proto.FileIDOrBuilder getFileIdOrBuilder() {
if (fileIdBuilder_ != null) {
return fileIdBuilder_.getMessageOrBuilder();
} else {
return fileId_ == null ?
com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.FileIDOrBuilder>
getFileIdFieldBuilder() {
if (fileIdBuilder_ == null) {
fileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.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;
bitField0_ |= 0x00000002;
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() {
bitField0_ = (bitField0_ & ~0x00000002);
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.hashgraph.sdk.proto.mirror.AddressBookQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery();
}
public static com.hedera.hashgraph.sdk.proto.mirror.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 {
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 com.hedera.hashgraph.sdk.proto.mirror.AddressBookQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}