com.hedera.hashgraph.sdk.proto.Topic 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: topic.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Representation of a Hedera Consensus Service topic in the network Merkle tree.
*
* As with all network entities, a topic has a unique entity number, which is usually given along
* with the network's shard and realm in the form of a shard.realm.number id.
*
* A topic consists of just two pieces of data:
* 1. The total number of messages sent to the topic; and,
* 2. The running hash of all those messages.
* It also has several metadata elements:
* 1. A consensus expiration time in seconds since the epoch.
* 2. (Optional) The number of an auto-renew account, in the same shard and realm as the topic, that
* has signed a transaction allowing the network to use its balance to automatically extend the topic's
* expiration time when it passes.
* 3. The number of seconds the network should automatically extend the topic's expiration by, if the
* topic has a valid auto-renew account, and is not deleted upon expiration.
* 4. A boolean marking if the topic has been deleted.
* 5. A memo string whose UTF-8 encoding is at most 100 bytes.
* 6. (Optional) An admin key whose signature must be active for the topic's metadata to be updated.
* 7. (Optional) A submit key whose signature must be active for the topic to receive a message.
*
*
* Protobuf type {@code proto.Topic}
*/
public final class Topic extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.Topic)
TopicOrBuilder {
private static final long serialVersionUID = 0L;
// Use Topic.newBuilder() to construct.
private Topic(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Topic() {
runningHash_ = com.google.protobuf.ByteString.EMPTY;
memo_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Topic();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.TopicOuterClass.internal_static_proto_Topic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.TopicOuterClass.internal_static_proto_Topic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.Topic.class, com.hedera.hashgraph.sdk.proto.Topic.Builder.class);
}
private int bitField0_;
public static final int TOPIC_ID_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.TopicID topicId_;
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 1;
* @return Whether the topicId field is set.
*/
@java.lang.Override
public boolean hasTopicId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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_;
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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 SEQUENCE_NUMBER_FIELD_NUMBER = 2;
private long sequenceNumber_ = 0L;
/**
*
**
* The number of messages sent to the topic.
*
*
* int64 sequence_number = 2;
* @return The sequenceNumber.
*/
@java.lang.Override
public long getSequenceNumber() {
return sequenceNumber_;
}
public static final int EXPIRATION_SECOND_FIELD_NUMBER = 3;
private long expirationSecond_ = 0L;
/**
*
**
* The topic's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 3;
* @return The expirationSecond.
*/
@java.lang.Override
public long getExpirationSecond() {
return expirationSecond_;
}
public static final int AUTO_RENEW_PERIOD_FIELD_NUMBER = 4;
private long autoRenewPeriod_ = 0L;
/**
*
**
* The number of seconds for which the topic will be automatically renewed
* upon expiring (if it has a valid auto-renew account).
*
*
* int64 auto_renew_period = 4;
* @return The autoRenewPeriod.
*/
@java.lang.Override
public long getAutoRenewPeriod() {
return autoRenewPeriod_;
}
public static final int AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER = 5;
private com.hedera.hashgraph.sdk.proto.AccountID autoRenewAccountId_;
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
* @return Whether the autoRenewAccountId field is set.
*/
@java.lang.Override
public boolean hasAutoRenewAccountId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
* @return The autoRenewAccountId.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getAutoRenewAccountId() {
return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_;
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAutoRenewAccountIdOrBuilder() {
return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_;
}
public static final int DELETED_FIELD_NUMBER = 6;
private boolean deleted_ = false;
/**
*
**
* Whether this topic is deleted.
*
*
* bool deleted = 6;
* @return The deleted.
*/
@java.lang.Override
public boolean getDeleted() {
return deleted_;
}
public static final int RUNNING_HASH_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString runningHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
* For each submitted message, the topic's running hash is then updated to the output
* of a particular SHA-384 digest whose input data include the previous running hash.
*
* See the TransactionReceipt.proto documentation for an exact description of the
* data included in the SHA-384 digest used for the update.
*
*
* bytes running_hash = 7;
* @return The runningHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRunningHash() {
return runningHash_;
}
public static final int MEMO_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object memo_ = "";
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @return The memo.
*/
@java.lang.Override
public java.lang.String getMemo() {
java.lang.Object ref = memo_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
memo_ = s;
return s;
}
}
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @return The bytes for memo.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMemoBytes() {
java.lang.Object ref = memo_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
memo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADMIN_KEY_FIELD_NUMBER = 9;
private com.hedera.hashgraph.sdk.proto.Key adminKey_;
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
* @return Whether the adminKey field is set.
*/
@java.lang.Override
public boolean hasAdminKey() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
* @return The adminKey.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Key getAdminKey() {
return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_;
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getAdminKeyOrBuilder() {
return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_;
}
public static final int SUBMIT_KEY_FIELD_NUMBER = 10;
private com.hedera.hashgraph.sdk.proto.Key submitKey_;
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
* @return Whether the submitKey field is set.
*/
@java.lang.Override
public boolean hasSubmitKey() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
* @return The submitKey.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Key getSubmitKey() {
return submitKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : submitKey_;
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getSubmitKeyOrBuilder() {
return submitKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : submitKey_;
}
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 (sequenceNumber_ != 0L) {
output.writeInt64(2, sequenceNumber_);
}
if (expirationSecond_ != 0L) {
output.writeInt64(3, expirationSecond_);
}
if (autoRenewPeriod_ != 0L) {
output.writeInt64(4, autoRenewPeriod_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getAutoRenewAccountId());
}
if (deleted_ != false) {
output.writeBool(6, deleted_);
}
if (!runningHash_.isEmpty()) {
output.writeBytes(7, runningHash_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, memo_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(9, getAdminKey());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(10, getSubmitKey());
}
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 (sequenceNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, sequenceNumber_);
}
if (expirationSecond_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, expirationSecond_);
}
if (autoRenewPeriod_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, autoRenewPeriod_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getAutoRenewAccountId());
}
if (deleted_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, deleted_);
}
if (!runningHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, runningHash_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, memo_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getAdminKey());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getSubmitKey());
}
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.Topic)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.Topic other = (com.hedera.hashgraph.sdk.proto.Topic) obj;
if (hasTopicId() != other.hasTopicId()) return false;
if (hasTopicId()) {
if (!getTopicId()
.equals(other.getTopicId())) return false;
}
if (getSequenceNumber()
!= other.getSequenceNumber()) return false;
if (getExpirationSecond()
!= other.getExpirationSecond()) return false;
if (getAutoRenewPeriod()
!= other.getAutoRenewPeriod()) return false;
if (hasAutoRenewAccountId() != other.hasAutoRenewAccountId()) return false;
if (hasAutoRenewAccountId()) {
if (!getAutoRenewAccountId()
.equals(other.getAutoRenewAccountId())) return false;
}
if (getDeleted()
!= other.getDeleted()) return false;
if (!getRunningHash()
.equals(other.getRunningHash())) return false;
if (!getMemo()
.equals(other.getMemo())) return false;
if (hasAdminKey() != other.hasAdminKey()) return false;
if (hasAdminKey()) {
if (!getAdminKey()
.equals(other.getAdminKey())) return false;
}
if (hasSubmitKey() != other.hasSubmitKey()) return false;
if (hasSubmitKey()) {
if (!getSubmitKey()
.equals(other.getSubmitKey())) 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) + TOPIC_ID_FIELD_NUMBER;
hash = (53 * hash) + getTopicId().hashCode();
}
hash = (37 * hash) + SEQUENCE_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSequenceNumber());
hash = (37 * hash) + EXPIRATION_SECOND_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getExpirationSecond());
hash = (37 * hash) + AUTO_RENEW_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAutoRenewPeriod());
if (hasAutoRenewAccountId()) {
hash = (37 * hash) + AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER;
hash = (53 * hash) + getAutoRenewAccountId().hashCode();
}
hash = (37 * hash) + DELETED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeleted());
hash = (37 * hash) + RUNNING_HASH_FIELD_NUMBER;
hash = (53 * hash) + getRunningHash().hashCode();
hash = (37 * hash) + MEMO_FIELD_NUMBER;
hash = (53 * hash) + getMemo().hashCode();
if (hasAdminKey()) {
hash = (37 * hash) + ADMIN_KEY_FIELD_NUMBER;
hash = (53 * hash) + getAdminKey().hashCode();
}
if (hasSubmitKey()) {
hash = (37 * hash) + SUBMIT_KEY_FIELD_NUMBER;
hash = (53 * hash) + getSubmitKey().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.Topic parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.Topic 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.Topic parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.Topic 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.Topic parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.Topic 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.Topic parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.Topic 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.Topic parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.Topic 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.Topic 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.Topic 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.Topic 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;
}
/**
*
**
* Representation of a Hedera Consensus Service topic in the network Merkle tree.
*
* As with all network entities, a topic has a unique entity number, which is usually given along
* with the network's shard and realm in the form of a shard.realm.number id.
*
* A topic consists of just two pieces of data:
* 1. The total number of messages sent to the topic; and,
* 2. The running hash of all those messages.
* It also has several metadata elements:
* 1. A consensus expiration time in seconds since the epoch.
* 2. (Optional) The number of an auto-renew account, in the same shard and realm as the topic, that
* has signed a transaction allowing the network to use its balance to automatically extend the topic's
* expiration time when it passes.
* 3. The number of seconds the network should automatically extend the topic's expiration by, if the
* topic has a valid auto-renew account, and is not deleted upon expiration.
* 4. A boolean marking if the topic has been deleted.
* 5. A memo string whose UTF-8 encoding is at most 100 bytes.
* 6. (Optional) An admin key whose signature must be active for the topic's metadata to be updated.
* 7. (Optional) A submit key whose signature must be active for the topic to receive a message.
*
*
* Protobuf type {@code proto.Topic}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.Topic)
com.hedera.hashgraph.sdk.proto.TopicOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.TopicOuterClass.internal_static_proto_Topic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.TopicOuterClass.internal_static_proto_Topic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.Topic.class, com.hedera.hashgraph.sdk.proto.Topic.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.Topic.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();
getAutoRenewAccountIdFieldBuilder();
getAdminKeyFieldBuilder();
getSubmitKeyFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
topicId_ = null;
if (topicIdBuilder_ != null) {
topicIdBuilder_.dispose();
topicIdBuilder_ = null;
}
sequenceNumber_ = 0L;
expirationSecond_ = 0L;
autoRenewPeriod_ = 0L;
autoRenewAccountId_ = null;
if (autoRenewAccountIdBuilder_ != null) {
autoRenewAccountIdBuilder_.dispose();
autoRenewAccountIdBuilder_ = null;
}
deleted_ = false;
runningHash_ = com.google.protobuf.ByteString.EMPTY;
memo_ = "";
adminKey_ = null;
if (adminKeyBuilder_ != null) {
adminKeyBuilder_.dispose();
adminKeyBuilder_ = null;
}
submitKey_ = null;
if (submitKeyBuilder_ != null) {
submitKeyBuilder_.dispose();
submitKeyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.TopicOuterClass.internal_static_proto_Topic_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Topic getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.Topic.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Topic build() {
com.hedera.hashgraph.sdk.proto.Topic result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Topic buildPartial() {
com.hedera.hashgraph.sdk.proto.Topic result = new com.hedera.hashgraph.sdk.proto.Topic(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.Topic 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.sequenceNumber_ = sequenceNumber_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.expirationSecond_ = expirationSecond_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.autoRenewPeriod_ = autoRenewPeriod_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.autoRenewAccountId_ = autoRenewAccountIdBuilder_ == null
? autoRenewAccountId_
: autoRenewAccountIdBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.deleted_ = deleted_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.runningHash_ = runningHash_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.memo_ = memo_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.adminKey_ = adminKeyBuilder_ == null
? adminKey_
: adminKeyBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.submitKey_ = submitKeyBuilder_ == null
? submitKey_
: submitKeyBuilder_.build();
to_bitField0_ |= 0x00000008;
}
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.Topic) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.Topic)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.Topic other) {
if (other == com.hedera.hashgraph.sdk.proto.Topic.getDefaultInstance()) return this;
if (other.hasTopicId()) {
mergeTopicId(other.getTopicId());
}
if (other.getSequenceNumber() != 0L) {
setSequenceNumber(other.getSequenceNumber());
}
if (other.getExpirationSecond() != 0L) {
setExpirationSecond(other.getExpirationSecond());
}
if (other.getAutoRenewPeriod() != 0L) {
setAutoRenewPeriod(other.getAutoRenewPeriod());
}
if (other.hasAutoRenewAccountId()) {
mergeAutoRenewAccountId(other.getAutoRenewAccountId());
}
if (other.getDeleted() != false) {
setDeleted(other.getDeleted());
}
if (other.getRunningHash() != com.google.protobuf.ByteString.EMPTY) {
setRunningHash(other.getRunningHash());
}
if (!other.getMemo().isEmpty()) {
memo_ = other.memo_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.hasAdminKey()) {
mergeAdminKey(other.getAdminKey());
}
if (other.hasSubmitKey()) {
mergeSubmitKey(other.getSubmitKey());
}
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 16: {
sequenceNumber_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
expirationSecond_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
autoRenewPeriod_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42: {
input.readMessage(
getAutoRenewAccountIdFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 48: {
deleted_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58: {
runningHash_ = input.readBytes();
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
memo_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 66
case 74: {
input.readMessage(
getAdminKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 82: {
input.readMessage(
getSubmitKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 82
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_;
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 1;
* @return Whether the topicId field is set.
*/
public boolean hasTopicId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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();
}
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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;
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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;
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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;
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 1;
*/
public Builder clearTopicId() {
bitField0_ = (bitField0_ & ~0x00000001);
topicId_ = null;
if (topicIdBuilder_ != null) {
topicIdBuilder_.dispose();
topicIdBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 1;
*/
public com.hedera.hashgraph.sdk.proto.TopicID.Builder getTopicIdBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTopicIdFieldBuilder().getBuilder();
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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_;
}
}
/**
*
**
* The topic's unique id in the Merkle state.
*
*
* .proto.TopicID topic_id = 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 long sequenceNumber_ ;
/**
*
**
* The number of messages sent to the topic.
*
*
* int64 sequence_number = 2;
* @return The sequenceNumber.
*/
@java.lang.Override
public long getSequenceNumber() {
return sequenceNumber_;
}
/**
*
**
* The number of messages sent to the topic.
*
*
* int64 sequence_number = 2;
* @param value The sequenceNumber to set.
* @return This builder for chaining.
*/
public Builder setSequenceNumber(long value) {
sequenceNumber_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The number of messages sent to the topic.
*
*
* int64 sequence_number = 2;
* @return This builder for chaining.
*/
public Builder clearSequenceNumber() {
bitField0_ = (bitField0_ & ~0x00000002);
sequenceNumber_ = 0L;
onChanged();
return this;
}
private long expirationSecond_ ;
/**
*
**
* The topic's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 3;
* @return The expirationSecond.
*/
@java.lang.Override
public long getExpirationSecond() {
return expirationSecond_;
}
/**
*
**
* The topic's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 3;
* @param value The expirationSecond to set.
* @return This builder for chaining.
*/
public Builder setExpirationSecond(long value) {
expirationSecond_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* The topic's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 3;
* @return This builder for chaining.
*/
public Builder clearExpirationSecond() {
bitField0_ = (bitField0_ & ~0x00000004);
expirationSecond_ = 0L;
onChanged();
return this;
}
private long autoRenewPeriod_ ;
/**
*
**
* The number of seconds for which the topic will be automatically renewed
* upon expiring (if it has a valid auto-renew account).
*
*
* int64 auto_renew_period = 4;
* @return The autoRenewPeriod.
*/
@java.lang.Override
public long getAutoRenewPeriod() {
return autoRenewPeriod_;
}
/**
*
**
* The number of seconds for which the topic will be automatically renewed
* upon expiring (if it has a valid auto-renew account).
*
*
* int64 auto_renew_period = 4;
* @param value The autoRenewPeriod to set.
* @return This builder for chaining.
*/
public Builder setAutoRenewPeriod(long value) {
autoRenewPeriod_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The number of seconds for which the topic will be automatically renewed
* upon expiring (if it has a valid auto-renew account).
*
*
* int64 auto_renew_period = 4;
* @return This builder for chaining.
*/
public Builder clearAutoRenewPeriod() {
bitField0_ = (bitField0_ & ~0x00000008);
autoRenewPeriod_ = 0L;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.AccountID autoRenewAccountId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> autoRenewAccountIdBuilder_;
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
* @return Whether the autoRenewAccountId field is set.
*/
public boolean hasAutoRenewAccountId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
* @return The autoRenewAccountId.
*/
public com.hedera.hashgraph.sdk.proto.AccountID getAutoRenewAccountId() {
if (autoRenewAccountIdBuilder_ == null) {
return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_;
} else {
return autoRenewAccountIdBuilder_.getMessage();
}
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public Builder setAutoRenewAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (autoRenewAccountIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
autoRenewAccountId_ = value;
} else {
autoRenewAccountIdBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public Builder setAutoRenewAccountId(
com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) {
if (autoRenewAccountIdBuilder_ == null) {
autoRenewAccountId_ = builderForValue.build();
} else {
autoRenewAccountIdBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public Builder mergeAutoRenewAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (autoRenewAccountIdBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
autoRenewAccountId_ != null &&
autoRenewAccountId_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) {
getAutoRenewAccountIdBuilder().mergeFrom(value);
} else {
autoRenewAccountId_ = value;
}
} else {
autoRenewAccountIdBuilder_.mergeFrom(value);
}
if (autoRenewAccountId_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public Builder clearAutoRenewAccountId() {
bitField0_ = (bitField0_ & ~0x00000010);
autoRenewAccountId_ = null;
if (autoRenewAccountIdBuilder_ != null) {
autoRenewAccountIdBuilder_.dispose();
autoRenewAccountIdBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public com.hedera.hashgraph.sdk.proto.AccountID.Builder getAutoRenewAccountIdBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAutoRenewAccountIdFieldBuilder().getBuilder();
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAutoRenewAccountIdOrBuilder() {
if (autoRenewAccountIdBuilder_ != null) {
return autoRenewAccountIdBuilder_.getMessageOrBuilder();
} else {
return autoRenewAccountId_ == null ?
com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_;
}
}
/**
*
**
* The id of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*
*
* .proto.AccountID auto_renew_account_id = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>
getAutoRenewAccountIdFieldBuilder() {
if (autoRenewAccountIdBuilder_ == null) {
autoRenewAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>(
getAutoRenewAccountId(),
getParentForChildren(),
isClean());
autoRenewAccountId_ = null;
}
return autoRenewAccountIdBuilder_;
}
private boolean deleted_ ;
/**
*
**
* Whether this topic is deleted.
*
*
* bool deleted = 6;
* @return The deleted.
*/
@java.lang.Override
public boolean getDeleted() {
return deleted_;
}
/**
*
**
* Whether this topic is deleted.
*
*
* bool deleted = 6;
* @param value The deleted to set.
* @return This builder for chaining.
*/
public Builder setDeleted(boolean value) {
deleted_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* Whether this topic is deleted.
*
*
* bool deleted = 6;
* @return This builder for chaining.
*/
public Builder clearDeleted() {
bitField0_ = (bitField0_ & ~0x00000020);
deleted_ = false;
onChanged();
return this;
}
private com.google.protobuf.ByteString runningHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
* For each submitted message, the topic's running hash is then updated to the output
* of a particular SHA-384 digest whose input data include the previous running hash.
*
* See the TransactionReceipt.proto documentation for an exact description of the
* data included in the SHA-384 digest used for the update.
*
*
* bytes running_hash = 7;
* @return The runningHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRunningHash() {
return runningHash_;
}
/**
*
**
* When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
* For each submitted message, the topic's running hash is then updated to the output
* of a particular SHA-384 digest whose input data include the previous running hash.
*
* See the TransactionReceipt.proto documentation for an exact description of the
* data included in the SHA-384 digest used for the update.
*
*
* bytes running_hash = 7;
* @param value The runningHash to set.
* @return This builder for chaining.
*/
public Builder setRunningHash(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
runningHash_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
**
* When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
* For each submitted message, the topic's running hash is then updated to the output
* of a particular SHA-384 digest whose input data include the previous running hash.
*
* See the TransactionReceipt.proto documentation for an exact description of the
* data included in the SHA-384 digest used for the update.
*
*
* bytes running_hash = 7;
* @return This builder for chaining.
*/
public Builder clearRunningHash() {
bitField0_ = (bitField0_ & ~0x00000040);
runningHash_ = getDefaultInstance().getRunningHash();
onChanged();
return this;
}
private java.lang.Object memo_ = "";
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @return The memo.
*/
public java.lang.String getMemo() {
java.lang.Object ref = memo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
memo_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @return The bytes for memo.
*/
public com.google.protobuf.ByteString
getMemoBytes() {
java.lang.Object ref = memo_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
memo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @param value The memo to set.
* @return This builder for chaining.
*/
public Builder setMemo(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
memo_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @return This builder for chaining.
*/
public Builder clearMemo() {
memo_ = getDefaultInstance().getMemo();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*
*
* string memo = 8;
* @param value The bytes for memo to set.
* @return This builder for chaining.
*/
public Builder setMemoBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
memo_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Key adminKey_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> adminKeyBuilder_;
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
* @return Whether the adminKey field is set.
*/
public boolean hasAdminKey() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
* @return The adminKey.
*/
public com.hedera.hashgraph.sdk.proto.Key getAdminKey() {
if (adminKeyBuilder_ == null) {
return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_;
} else {
return adminKeyBuilder_.getMessage();
}
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public Builder setAdminKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (adminKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
adminKey_ = value;
} else {
adminKeyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public Builder setAdminKey(
com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) {
if (adminKeyBuilder_ == null) {
adminKey_ = builderForValue.build();
} else {
adminKeyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public Builder mergeAdminKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (adminKeyBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0) &&
adminKey_ != null &&
adminKey_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) {
getAdminKeyBuilder().mergeFrom(value);
} else {
adminKey_ = value;
}
} else {
adminKeyBuilder_.mergeFrom(value);
}
if (adminKey_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public Builder clearAdminKey() {
bitField0_ = (bitField0_ & ~0x00000100);
adminKey_ = null;
if (adminKeyBuilder_ != null) {
adminKeyBuilder_.dispose();
adminKeyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public com.hedera.hashgraph.sdk.proto.Key.Builder getAdminKeyBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getAdminKeyFieldBuilder().getBuilder();
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getAdminKeyOrBuilder() {
if (adminKeyBuilder_ != null) {
return adminKeyBuilder_.getMessageOrBuilder();
} else {
return adminKey_ == null ?
com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_;
}
}
/**
*
**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*
*
* .proto.Key admin_key = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>
getAdminKeyFieldBuilder() {
if (adminKeyBuilder_ == null) {
adminKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>(
getAdminKey(),
getParentForChildren(),
isClean());
adminKey_ = null;
}
return adminKeyBuilder_;
}
private com.hedera.hashgraph.sdk.proto.Key submitKey_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> submitKeyBuilder_;
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
* @return Whether the submitKey field is set.
*/
public boolean hasSubmitKey() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
* @return The submitKey.
*/
public com.hedera.hashgraph.sdk.proto.Key getSubmitKey() {
if (submitKeyBuilder_ == null) {
return submitKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : submitKey_;
} else {
return submitKeyBuilder_.getMessage();
}
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public Builder setSubmitKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (submitKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
submitKey_ = value;
} else {
submitKeyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public Builder setSubmitKey(
com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) {
if (submitKeyBuilder_ == null) {
submitKey_ = builderForValue.build();
} else {
submitKeyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public Builder mergeSubmitKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (submitKeyBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0) &&
submitKey_ != null &&
submitKey_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) {
getSubmitKeyBuilder().mergeFrom(value);
} else {
submitKey_ = value;
}
} else {
submitKeyBuilder_.mergeFrom(value);
}
if (submitKey_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public Builder clearSubmitKey() {
bitField0_ = (bitField0_ & ~0x00000200);
submitKey_ = null;
if (submitKeyBuilder_ != null) {
submitKeyBuilder_.dispose();
submitKeyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public com.hedera.hashgraph.sdk.proto.Key.Builder getSubmitKeyBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getSubmitKeyFieldBuilder().getBuilder();
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getSubmitKeyOrBuilder() {
if (submitKeyBuilder_ != null) {
return submitKeyBuilder_.getMessageOrBuilder();
} else {
return submitKey_ == null ?
com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : submitKey_;
}
}
/**
*
**
* If present, enforces access control for message submission to the topic.
*
*
* .proto.Key submit_key = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>
getSubmitKeyFieldBuilder() {
if (submitKeyBuilder_ == null) {
submitKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>(
getSubmitKey(),
getParentForChildren(),
isClean());
submitKey_ = null;
}
return submitKeyBuilder_;
}
@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:proto.Topic)
}
// @@protoc_insertion_point(class_scope:proto.Topic)
private static final com.hedera.hashgraph.sdk.proto.Topic DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.Topic();
}
public static com.hedera.hashgraph.sdk.proto.Topic getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Topic 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.Topic getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}