com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery 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/consensus_service.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto.mirror;
/**
* Protobuf type {@code com.hedera.mirror.api.proto.ConsensusTopicQuery}
*/
public final class ConsensusTopicQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.mirror.api.proto.ConsensusTopicQuery)
ConsensusTopicQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConsensusTopicQuery.newBuilder() to construct.
private ConsensusTopicQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConsensusTopicQuery() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConsensusTopicQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.internal_static_com_hedera_mirror_api_proto_ConsensusTopicQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.internal_static_com_hedera_mirror_api_proto_ConsensusTopicQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.class, com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.Builder.class);
}
private int bitField0_;
public static final int TOPICID_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.TopicID topicID_;
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
* @return Whether the topicID field is set.
*/
@java.lang.Override
public boolean hasTopicID() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
* @return The topicID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TopicID getTopicID() {
return topicID_ == null ? com.hedera.hashgraph.sdk.proto.TopicID.getDefaultInstance() : topicID_;
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TopicIDOrBuilder getTopicIDOrBuilder() {
return topicID_ == null ? com.hedera.hashgraph.sdk.proto.TopicID.getDefaultInstance() : topicID_;
}
public static final int CONSENSUSSTARTTIME_FIELD_NUMBER = 2;
private com.hedera.hashgraph.sdk.proto.Timestamp consensusStartTime_;
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
* @return Whether the consensusStartTime field is set.
*/
@java.lang.Override
public boolean hasConsensusStartTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
* @return The consensusStartTime.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getConsensusStartTime() {
return consensusStartTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusStartTime_;
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsensusStartTimeOrBuilder() {
return consensusStartTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusStartTime_;
}
public static final int CONSENSUSENDTIME_FIELD_NUMBER = 3;
private com.hedera.hashgraph.sdk.proto.Timestamp consensusEndTime_;
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
* @return Whether the consensusEndTime field is set.
*/
@java.lang.Override
public boolean hasConsensusEndTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
* @return The consensusEndTime.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getConsensusEndTime() {
return consensusEndTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusEndTime_;
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsensusEndTimeOrBuilder() {
return consensusEndTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusEndTime_;
}
public static final int LIMIT_FIELD_NUMBER = 4;
private long limit_ = 0L;
/**
*
**
* The maximum number of messages to receive before stopping. If not set or set to zero it will
* return messages indefinitely.
*
*
* uint64 limit = 4;
* @return The limit.
*/
@java.lang.Override
public long 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, getTopicID());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getConsensusStartTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getConsensusEndTime());
}
if (limit_ != 0L) {
output.writeUInt64(4, 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, getTopicID());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getConsensusStartTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getConsensusEndTime());
}
if (limit_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, 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.ConsensusTopicQuery)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery other = (com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery) obj;
if (hasTopicID() != other.hasTopicID()) return false;
if (hasTopicID()) {
if (!getTopicID()
.equals(other.getTopicID())) return false;
}
if (hasConsensusStartTime() != other.hasConsensusStartTime()) return false;
if (hasConsensusStartTime()) {
if (!getConsensusStartTime()
.equals(other.getConsensusStartTime())) return false;
}
if (hasConsensusEndTime() != other.hasConsensusEndTime()) return false;
if (hasConsensusEndTime()) {
if (!getConsensusEndTime()
.equals(other.getConsensusEndTime())) 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 (hasTopicID()) {
hash = (37 * hash) + TOPICID_FIELD_NUMBER;
hash = (53 * hash) + getTopicID().hashCode();
}
if (hasConsensusStartTime()) {
hash = (37 * hash) + CONSENSUSSTARTTIME_FIELD_NUMBER;
hash = (53 * hash) + getConsensusStartTime().hashCode();
}
if (hasConsensusEndTime()) {
hash = (37 * hash) + CONSENSUSENDTIME_FIELD_NUMBER;
hash = (53 * hash) + getConsensusEndTime().hashCode();
}
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLimit());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery 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.ConsensusTopicQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery 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.ConsensusTopicQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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.ConsensusTopicQuery 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;
}
/**
* Protobuf type {@code com.hedera.mirror.api.proto.ConsensusTopicQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.mirror.api.proto.ConsensusTopicQuery)
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.internal_static_com_hedera_mirror_api_proto_ConsensusTopicQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.internal_static_com_hedera_mirror_api_proto_ConsensusTopicQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.class, com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTopicIDFieldBuilder();
getConsensusStartTimeFieldBuilder();
getConsensusEndTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
topicID_ = null;
if (topicIDBuilder_ != null) {
topicIDBuilder_.dispose();
topicIDBuilder_ = null;
}
consensusStartTime_ = null;
if (consensusStartTimeBuilder_ != null) {
consensusStartTimeBuilder_.dispose();
consensusStartTimeBuilder_ = null;
}
consensusEndTime_ = null;
if (consensusEndTimeBuilder_ != null) {
consensusEndTimeBuilder_.dispose();
consensusEndTimeBuilder_ = null;
}
limit_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.internal_static_com_hedera_mirror_api_proto_ConsensusTopicQuery_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery build() {
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery buildPartial() {
com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery result = new com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.topicID_ = topicIDBuilder_ == null
? topicID_
: topicIDBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.consensusStartTime_ = consensusStartTimeBuilder_ == null
? consensusStartTime_
: consensusStartTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.consensusEndTime_ = consensusEndTimeBuilder_ == null
? consensusEndTime_
: consensusEndTimeBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 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.ConsensusTopicQuery) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery other) {
if (other == com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.getDefaultInstance()) return this;
if (other.hasTopicID()) {
mergeTopicID(other.getTopicID());
}
if (other.hasConsensusStartTime()) {
mergeConsensusStartTime(other.getConsensusStartTime());
}
if (other.hasConsensusEndTime()) {
mergeConsensusEndTime(other.getConsensusEndTime());
}
if (other.getLimit() != 0L) {
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(
getTopicIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getConsensusStartTimeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getConsensusEndTimeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
limit_ = input.readUInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
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.TopicID topicID_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TopicID, com.hedera.hashgraph.sdk.proto.TopicID.Builder, com.hedera.hashgraph.sdk.proto.TopicIDOrBuilder> topicIDBuilder_;
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
* @return Whether the topicID field is set.
*/
public boolean hasTopicID() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
* @return The topicID.
*/
public com.hedera.hashgraph.sdk.proto.TopicID getTopicID() {
if (topicIDBuilder_ == null) {
return topicID_ == null ? com.hedera.hashgraph.sdk.proto.TopicID.getDefaultInstance() : topicID_;
} else {
return topicIDBuilder_.getMessage();
}
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public Builder setTopicID(com.hedera.hashgraph.sdk.proto.TopicID value) {
if (topicIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
topicID_ = value;
} else {
topicIDBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public Builder setTopicID(
com.hedera.hashgraph.sdk.proto.TopicID.Builder builderForValue) {
if (topicIDBuilder_ == null) {
topicID_ = builderForValue.build();
} else {
topicIDBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public Builder mergeTopicID(com.hedera.hashgraph.sdk.proto.TopicID value) {
if (topicIDBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
topicID_ != null &&
topicID_ != com.hedera.hashgraph.sdk.proto.TopicID.getDefaultInstance()) {
getTopicIDBuilder().mergeFrom(value);
} else {
topicID_ = value;
}
} else {
topicIDBuilder_.mergeFrom(value);
}
if (topicID_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public Builder clearTopicID() {
bitField0_ = (bitField0_ & ~0x00000001);
topicID_ = null;
if (topicIDBuilder_ != null) {
topicIDBuilder_.dispose();
topicIDBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public com.hedera.hashgraph.sdk.proto.TopicID.Builder getTopicIDBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTopicIDFieldBuilder().getBuilder();
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
public com.hedera.hashgraph.sdk.proto.TopicIDOrBuilder getTopicIDOrBuilder() {
if (topicIDBuilder_ != null) {
return topicIDBuilder_.getMessageOrBuilder();
} else {
return topicID_ == null ?
com.hedera.hashgraph.sdk.proto.TopicID.getDefaultInstance() : topicID_;
}
}
/**
*
**
* A required topic ID to retrieve messages for.
*
*
* .proto.TopicID topicID = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TopicID, com.hedera.hashgraph.sdk.proto.TopicID.Builder, com.hedera.hashgraph.sdk.proto.TopicIDOrBuilder>
getTopicIDFieldBuilder() {
if (topicIDBuilder_ == null) {
topicIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TopicID, com.hedera.hashgraph.sdk.proto.TopicID.Builder, com.hedera.hashgraph.sdk.proto.TopicIDOrBuilder>(
getTopicID(),
getParentForChildren(),
isClean());
topicID_ = null;
}
return topicIDBuilder_;
}
private com.hedera.hashgraph.sdk.proto.Timestamp consensusStartTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> consensusStartTimeBuilder_;
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
* @return Whether the consensusStartTime field is set.
*/
public boolean hasConsensusStartTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
* @return The consensusStartTime.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getConsensusStartTime() {
if (consensusStartTimeBuilder_ == null) {
return consensusStartTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusStartTime_;
} else {
return consensusStartTimeBuilder_.getMessage();
}
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public Builder setConsensusStartTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consensusStartTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consensusStartTime_ = value;
} else {
consensusStartTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public Builder setConsensusStartTime(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (consensusStartTimeBuilder_ == null) {
consensusStartTime_ = builderForValue.build();
} else {
consensusStartTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public Builder mergeConsensusStartTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consensusStartTimeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
consensusStartTime_ != null &&
consensusStartTime_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getConsensusStartTimeBuilder().mergeFrom(value);
} else {
consensusStartTime_ = value;
}
} else {
consensusStartTimeBuilder_.mergeFrom(value);
}
if (consensusStartTime_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public Builder clearConsensusStartTime() {
bitField0_ = (bitField0_ & ~0x00000002);
consensusStartTime_ = null;
if (consensusStartTimeBuilder_ != null) {
consensusStartTimeBuilder_.dispose();
consensusStartTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getConsensusStartTimeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getConsensusStartTimeFieldBuilder().getBuilder();
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsensusStartTimeOrBuilder() {
if (consensusStartTimeBuilder_ != null) {
return consensusStartTimeBuilder_.getMessageOrBuilder();
} else {
return consensusStartTime_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusStartTime_;
}
}
/**
*
**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*
*
* .proto.Timestamp consensusStartTime = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getConsensusStartTimeFieldBuilder() {
if (consensusStartTimeBuilder_ == null) {
consensusStartTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getConsensusStartTime(),
getParentForChildren(),
isClean());
consensusStartTime_ = null;
}
return consensusStartTimeBuilder_;
}
private com.hedera.hashgraph.sdk.proto.Timestamp consensusEndTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> consensusEndTimeBuilder_;
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
* @return Whether the consensusEndTime field is set.
*/
public boolean hasConsensusEndTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
* @return The consensusEndTime.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getConsensusEndTime() {
if (consensusEndTimeBuilder_ == null) {
return consensusEndTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusEndTime_;
} else {
return consensusEndTimeBuilder_.getMessage();
}
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public Builder setConsensusEndTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consensusEndTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consensusEndTime_ = value;
} else {
consensusEndTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public Builder setConsensusEndTime(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (consensusEndTimeBuilder_ == null) {
consensusEndTime_ = builderForValue.build();
} else {
consensusEndTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public Builder mergeConsensusEndTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consensusEndTimeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
consensusEndTime_ != null &&
consensusEndTime_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getConsensusEndTimeBuilder().mergeFrom(value);
} else {
consensusEndTime_ = value;
}
} else {
consensusEndTimeBuilder_.mergeFrom(value);
}
if (consensusEndTime_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public Builder clearConsensusEndTime() {
bitField0_ = (bitField0_ & ~0x00000004);
consensusEndTime_ = null;
if (consensusEndTimeBuilder_ != null) {
consensusEndTimeBuilder_.dispose();
consensusEndTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getConsensusEndTimeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getConsensusEndTimeFieldBuilder().getBuilder();
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsensusEndTimeOrBuilder() {
if (consensusEndTimeBuilder_ != null) {
return consensusEndTimeBuilder_.getMessageOrBuilder();
} else {
return consensusEndTime_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consensusEndTime_;
}
}
/**
*
**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*
*
* .proto.Timestamp consensusEndTime = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getConsensusEndTimeFieldBuilder() {
if (consensusEndTimeBuilder_ == null) {
consensusEndTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getConsensusEndTime(),
getParentForChildren(),
isClean());
consensusEndTime_ = null;
}
return consensusEndTimeBuilder_;
}
private long limit_ ;
/**
*
**
* The maximum number of messages to receive before stopping. If not set or set to zero it will
* return messages indefinitely.
*
*
* uint64 limit = 4;
* @return The limit.
*/
@java.lang.Override
public long getLimit() {
return limit_;
}
/**
*
**
* The maximum number of messages to receive before stopping. If not set or set to zero it will
* return messages indefinitely.
*
*
* uint64 limit = 4;
* @param value The limit to set.
* @return This builder for chaining.
*/
public Builder setLimit(long value) {
limit_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The maximum number of messages to receive before stopping. If not set or set to zero it will
* return messages indefinitely.
*
*
* uint64 limit = 4;
* @return This builder for chaining.
*/
public Builder clearLimit() {
bitField0_ = (bitField0_ & ~0x00000008);
limit_ = 0L;
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.ConsensusTopicQuery)
}
// @@protoc_insertion_point(class_scope:com.hedera.mirror.api.proto.ConsensusTopicQuery)
private static final com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery();
}
public static com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConsensusTopicQuery 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.ConsensusTopicQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}