com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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: file_create.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Create a new file, containing the given contents.
* After the file is created, the FileID for it can be found in the receipt, or record, or retrieved
* with a GetByKey query.
*
* The file contains the specified contents (possibly empty). The file will automatically disappear
* at the expirationTime, unless its expiration is extended by another transaction before that time.
* If the file is deleted, then its contents will become empty and it will be marked as deleted
* until it expires, and then it will cease to exist.
*
* The keys field is a list of keys. All keys within the top-level key list must sign (M-M) to
* create or modify a file. However, to delete the file, only one key (1-M) is required to sign from
* the top-level key list. Each of those "keys" may itself be threshold key containing other keys
* (including other threshold keys). In other words, the behavior is an AND for create/modify, OR
* for delete. This is useful for acting as a revocation server. If it is desired to have the
* behavior be AND for all 3 operations (or OR for all 3), then the list should have only a single
* Key, which is a threshold key, with N=1 for OR, N=M for AND. If the auto_renew_account field
* is set, the key of the referenced account must sign.
*
* If a file is created without ANY keys in the keys field, the file is immutable and ONLY the
* expirationTime of the file can be changed with a FileUpdate transaction. The file contents or its
* keys cannot be changed.
*
* An entity (account, file, or smart contract instance) must be created in a particular realm. If
* the realmID is left null, then a new realm will be created with the given admin key. If a new
* realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an
* admin key is given, then any transaction to create/modify/delete an entity in that realm must be
* signed by that key, though anyone can still call functions on smart contract instances that exist
* in that realm. A realm ceases to exist when everything within it has expired and no longer
* exists.
*
* The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0
* and realm 0, with a null key. Future versions of the API will support multiple realms and
* multiple shards.
*
*
* Protobuf type {@code proto.FileCreateTransactionBody}
*/
public final class FileCreateTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.FileCreateTransactionBody)
FileCreateTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use FileCreateTransactionBody.newBuilder() to construct.
private FileCreateTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FileCreateTransactionBody() {
contents_ = com.google.protobuf.ByteString.EMPTY;
memo_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FileCreateTransactionBody();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.FileCreate.internal_static_proto_FileCreateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.FileCreate.internal_static_proto_FileCreateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.Builder.class);
}
private int bitField0_;
public static final int EXPIRATIONTIME_FIELD_NUMBER = 2;
private com.hedera.hashgraph.sdk.proto.Timestamp expirationTime_;
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
* @return Whether the expirationTime field is set.
*/
@java.lang.Override
public boolean hasExpirationTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
* @return The expirationTime.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getExpirationTime() {
return expirationTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : expirationTime_;
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getExpirationTimeOrBuilder() {
return expirationTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : expirationTime_;
}
public static final int KEYS_FIELD_NUMBER = 3;
private com.hedera.hashgraph.sdk.proto.KeyList keys_;
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
* @return Whether the keys field is set.
*/
@java.lang.Override
public boolean hasKeys() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
* @return The keys.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyList getKeys() {
return keys_ == null ? com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance() : keys_;
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyListOrBuilder getKeysOrBuilder() {
return keys_ == null ? com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance() : keys_;
}
public static final int CONTENTS_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return The contents.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContents() {
return contents_;
}
public static final int SHARDID_FIELD_NUMBER = 5;
private com.hedera.hashgraph.sdk.proto.ShardID shardID_;
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
* @return Whether the shardID field is set.
*/
@java.lang.Override
public boolean hasShardID() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
* @return The shardID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ShardID getShardID() {
return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_;
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder getShardIDOrBuilder() {
return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_;
}
public static final int REALMID_FIELD_NUMBER = 6;
private com.hedera.hashgraph.sdk.proto.RealmID realmID_;
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
* @return Whether the realmID field is set.
*/
@java.lang.Override
public boolean hasRealmID() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
* @return The realmID.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RealmID getRealmID() {
return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_;
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder getRealmIDOrBuilder() {
return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_;
}
public static final int NEWREALMADMINKEY_FIELD_NUMBER = 7;
private com.hedera.hashgraph.sdk.proto.Key newRealmAdminKey_;
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
* @return Whether the newRealmAdminKey field is set.
*/
@java.lang.Override
public boolean hasNewRealmAdminKey() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
* @return The newRealmAdminKey.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Key getNewRealmAdminKey() {
return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_;
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getNewRealmAdminKeyOrBuilder() {
return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_;
}
public static final int MEMO_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object memo_ = "";
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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;
}
}
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(2, getExpirationTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getKeys());
}
if (!contents_.isEmpty()) {
output.writeBytes(4, contents_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getShardID());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(6, getRealmID());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(7, getNewRealmAdminKey());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, memo_);
}
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(2, getExpirationTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getKeys());
}
if (!contents_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, contents_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getShardID());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getRealmID());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getNewRealmAdminKey());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, memo_);
}
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.FileCreateTransactionBody)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody other = (com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody) obj;
if (hasExpirationTime() != other.hasExpirationTime()) return false;
if (hasExpirationTime()) {
if (!getExpirationTime()
.equals(other.getExpirationTime())) return false;
}
if (hasKeys() != other.hasKeys()) return false;
if (hasKeys()) {
if (!getKeys()
.equals(other.getKeys())) return false;
}
if (!getContents()
.equals(other.getContents())) return false;
if (hasShardID() != other.hasShardID()) return false;
if (hasShardID()) {
if (!getShardID()
.equals(other.getShardID())) return false;
}
if (hasRealmID() != other.hasRealmID()) return false;
if (hasRealmID()) {
if (!getRealmID()
.equals(other.getRealmID())) return false;
}
if (hasNewRealmAdminKey() != other.hasNewRealmAdminKey()) return false;
if (hasNewRealmAdminKey()) {
if (!getNewRealmAdminKey()
.equals(other.getNewRealmAdminKey())) return false;
}
if (!getMemo()
.equals(other.getMemo())) 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 (hasExpirationTime()) {
hash = (37 * hash) + EXPIRATIONTIME_FIELD_NUMBER;
hash = (53 * hash) + getExpirationTime().hashCode();
}
if (hasKeys()) {
hash = (37 * hash) + KEYS_FIELD_NUMBER;
hash = (53 * hash) + getKeys().hashCode();
}
hash = (37 * hash) + CONTENTS_FIELD_NUMBER;
hash = (53 * hash) + getContents().hashCode();
if (hasShardID()) {
hash = (37 * hash) + SHARDID_FIELD_NUMBER;
hash = (53 * hash) + getShardID().hashCode();
}
if (hasRealmID()) {
hash = (37 * hash) + REALMID_FIELD_NUMBER;
hash = (53 * hash) + getRealmID().hashCode();
}
if (hasNewRealmAdminKey()) {
hash = (37 * hash) + NEWREALMADMINKEY_FIELD_NUMBER;
hash = (53 * hash) + getNewRealmAdminKey().hashCode();
}
hash = (37 * hash) + MEMO_FIELD_NUMBER;
hash = (53 * hash) + getMemo().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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.FileCreateTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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.FileCreateTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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.FileCreateTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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.FileCreateTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody 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.FileCreateTransactionBody 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.FileCreateTransactionBody 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.FileCreateTransactionBody 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;
}
/**
*
**
* Create a new file, containing the given contents.
* After the file is created, the FileID for it can be found in the receipt, or record, or retrieved
* with a GetByKey query.
*
* The file contains the specified contents (possibly empty). The file will automatically disappear
* at the expirationTime, unless its expiration is extended by another transaction before that time.
* If the file is deleted, then its contents will become empty and it will be marked as deleted
* until it expires, and then it will cease to exist.
*
* The keys field is a list of keys. All keys within the top-level key list must sign (M-M) to
* create or modify a file. However, to delete the file, only one key (1-M) is required to sign from
* the top-level key list. Each of those "keys" may itself be threshold key containing other keys
* (including other threshold keys). In other words, the behavior is an AND for create/modify, OR
* for delete. This is useful for acting as a revocation server. If it is desired to have the
* behavior be AND for all 3 operations (or OR for all 3), then the list should have only a single
* Key, which is a threshold key, with N=1 for OR, N=M for AND. If the auto_renew_account field
* is set, the key of the referenced account must sign.
*
* If a file is created without ANY keys in the keys field, the file is immutable and ONLY the
* expirationTime of the file can be changed with a FileUpdate transaction. The file contents or its
* keys cannot be changed.
*
* An entity (account, file, or smart contract instance) must be created in a particular realm. If
* the realmID is left null, then a new realm will be created with the given admin key. If a new
* realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an
* admin key is given, then any transaction to create/modify/delete an entity in that realm must be
* signed by that key, though anyone can still call functions on smart contract instances that exist
* in that realm. A realm ceases to exist when everything within it has expired and no longer
* exists.
*
* The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0
* and realm 0, with a null key. Future versions of the API will support multiple realms and
* multiple shards.
*
*
* Protobuf type {@code proto.FileCreateTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.FileCreateTransactionBody)
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.FileCreate.internal_static_proto_FileCreateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.FileCreate.internal_static_proto_FileCreateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExpirationTimeFieldBuilder();
getKeysFieldBuilder();
getShardIDFieldBuilder();
getRealmIDFieldBuilder();
getNewRealmAdminKeyFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
expirationTime_ = null;
if (expirationTimeBuilder_ != null) {
expirationTimeBuilder_.dispose();
expirationTimeBuilder_ = null;
}
keys_ = null;
if (keysBuilder_ != null) {
keysBuilder_.dispose();
keysBuilder_ = null;
}
contents_ = com.google.protobuf.ByteString.EMPTY;
shardID_ = null;
if (shardIDBuilder_ != null) {
shardIDBuilder_.dispose();
shardIDBuilder_ = null;
}
realmID_ = null;
if (realmIDBuilder_ != null) {
realmIDBuilder_.dispose();
realmIDBuilder_ = null;
}
newRealmAdminKey_ = null;
if (newRealmAdminKeyBuilder_ != null) {
newRealmAdminKeyBuilder_.dispose();
newRealmAdminKeyBuilder_ = null;
}
memo_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.FileCreate.internal_static_proto_FileCreateTransactionBody_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody build() {
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody buildPartial() {
com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody result = new com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.expirationTime_ = expirationTimeBuilder_ == null
? expirationTime_
: expirationTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.keys_ = keysBuilder_ == null
? keys_
: keysBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.contents_ = contents_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.shardID_ = shardIDBuilder_ == null
? shardID_
: shardIDBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.realmID_ = realmIDBuilder_ == null
? realmID_
: realmIDBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.newRealmAdminKey_ = newRealmAdminKeyBuilder_ == null
? newRealmAdminKey_
: newRealmAdminKeyBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.memo_ = memo_;
}
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.FileCreateTransactionBody) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody other) {
if (other == com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody.getDefaultInstance()) return this;
if (other.hasExpirationTime()) {
mergeExpirationTime(other.getExpirationTime());
}
if (other.hasKeys()) {
mergeKeys(other.getKeys());
}
if (other.getContents() != com.google.protobuf.ByteString.EMPTY) {
setContents(other.getContents());
}
if (other.hasShardID()) {
mergeShardID(other.getShardID());
}
if (other.hasRealmID()) {
mergeRealmID(other.getRealmID());
}
if (other.hasNewRealmAdminKey()) {
mergeNewRealmAdminKey(other.getNewRealmAdminKey());
}
if (!other.getMemo().isEmpty()) {
memo_ = other.memo_;
bitField0_ |= 0x00000040;
onChanged();
}
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 18: {
input.readMessage(
getExpirationTimeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
input.readMessage(
getKeysFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
contents_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 34
case 42: {
input.readMessage(
getShardIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 42
case 50: {
input.readMessage(
getRealmIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 50
case 58: {
input.readMessage(
getNewRealmAdminKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 58
case 66: {
memo_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 66
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.Timestamp expirationTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> expirationTimeBuilder_;
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
* @return Whether the expirationTime field is set.
*/
public boolean hasExpirationTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
* @return The expirationTime.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getExpirationTime() {
if (expirationTimeBuilder_ == null) {
return expirationTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : expirationTime_;
} else {
return expirationTimeBuilder_.getMessage();
}
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public Builder setExpirationTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (expirationTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expirationTime_ = value;
} else {
expirationTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public Builder setExpirationTime(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (expirationTimeBuilder_ == null) {
expirationTime_ = builderForValue.build();
} else {
expirationTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public Builder mergeExpirationTime(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (expirationTimeBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
expirationTime_ != null &&
expirationTime_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getExpirationTimeBuilder().mergeFrom(value);
} else {
expirationTime_ = value;
}
} else {
expirationTimeBuilder_.mergeFrom(value);
}
if (expirationTime_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public Builder clearExpirationTime() {
bitField0_ = (bitField0_ & ~0x00000001);
expirationTime_ = null;
if (expirationTimeBuilder_ != null) {
expirationTimeBuilder_.dispose();
expirationTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getExpirationTimeBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getExpirationTimeFieldBuilder().getBuilder();
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 2;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getExpirationTimeOrBuilder() {
if (expirationTimeBuilder_ != null) {
return expirationTimeBuilder_.getMessageOrBuilder();
} else {
return expirationTime_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : expirationTime_;
}
}
/**
*
**
* The time at which this file should expire (unless FileUpdateTransaction is used before then
* to extend its life)
*
*
* .proto.Timestamp expirationTime = 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>
getExpirationTimeFieldBuilder() {
if (expirationTimeBuilder_ == null) {
expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getExpirationTime(),
getParentForChildren(),
isClean());
expirationTime_ = null;
}
return expirationTimeBuilder_;
}
private com.hedera.hashgraph.sdk.proto.KeyList keys_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder> keysBuilder_;
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
* @return Whether the keys field is set.
*/
public boolean hasKeys() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
* @return The keys.
*/
public com.hedera.hashgraph.sdk.proto.KeyList getKeys() {
if (keysBuilder_ == null) {
return keys_ == null ? com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance() : keys_;
} else {
return keysBuilder_.getMessage();
}
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder setKeys(com.hedera.hashgraph.sdk.proto.KeyList value) {
if (keysBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keys_ = value;
} else {
keysBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder setKeys(
com.hedera.hashgraph.sdk.proto.KeyList.Builder builderForValue) {
if (keysBuilder_ == null) {
keys_ = builderForValue.build();
} else {
keysBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder mergeKeys(com.hedera.hashgraph.sdk.proto.KeyList value) {
if (keysBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
keys_ != null &&
keys_ != com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance()) {
getKeysBuilder().mergeFrom(value);
} else {
keys_ = value;
}
} else {
keysBuilder_.mergeFrom(value);
}
if (keys_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder clearKeys() {
bitField0_ = (bitField0_ & ~0x00000002);
keys_ = null;
if (keysBuilder_ != null) {
keysBuilder_.dispose();
keysBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public com.hedera.hashgraph.sdk.proto.KeyList.Builder getKeysBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getKeysFieldBuilder().getBuilder();
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public com.hedera.hashgraph.sdk.proto.KeyListOrBuilder getKeysOrBuilder() {
if (keysBuilder_ != null) {
return keysBuilder_.getMessageOrBuilder();
} else {
return keys_ == null ?
com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance() : keys_;
}
}
/**
*
**
* All keys at the top level of a key list must sign to create or modify the file. Any one of
* the keys at the top level key list can sign to delete the file.
*
*
* .proto.KeyList keys = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder>
getKeysFieldBuilder() {
if (keysBuilder_ == null) {
keysBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder>(
getKeys(),
getParentForChildren(),
isClean());
keys_ = null;
}
return keysBuilder_;
}
private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return The contents.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContents() {
return contents_;
}
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @param value The contents to set.
* @return This builder for chaining.
*/
public Builder setContents(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
contents_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return This builder for chaining.
*/
public Builder clearContents() {
bitField0_ = (bitField0_ & ~0x00000004);
contents_ = getDefaultInstance().getContents();
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.ShardID shardID_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder> shardIDBuilder_;
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
* @return Whether the shardID field is set.
*/
public boolean hasShardID() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
* @return The shardID.
*/
public com.hedera.hashgraph.sdk.proto.ShardID getShardID() {
if (shardIDBuilder_ == null) {
return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_;
} else {
return shardIDBuilder_.getMessage();
}
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public Builder setShardID(com.hedera.hashgraph.sdk.proto.ShardID value) {
if (shardIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shardID_ = value;
} else {
shardIDBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public Builder setShardID(
com.hedera.hashgraph.sdk.proto.ShardID.Builder builderForValue) {
if (shardIDBuilder_ == null) {
shardID_ = builderForValue.build();
} else {
shardIDBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public Builder mergeShardID(com.hedera.hashgraph.sdk.proto.ShardID value) {
if (shardIDBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
shardID_ != null &&
shardID_ != com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance()) {
getShardIDBuilder().mergeFrom(value);
} else {
shardID_ = value;
}
} else {
shardIDBuilder_.mergeFrom(value);
}
if (shardID_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public Builder clearShardID() {
bitField0_ = (bitField0_ & ~0x00000008);
shardID_ = null;
if (shardIDBuilder_ != null) {
shardIDBuilder_.dispose();
shardIDBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public com.hedera.hashgraph.sdk.proto.ShardID.Builder getShardIDBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getShardIDFieldBuilder().getBuilder();
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
public com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder getShardIDOrBuilder() {
if (shardIDBuilder_ != null) {
return shardIDBuilder_.getMessageOrBuilder();
} else {
return shardID_ == null ?
com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_;
}
}
/**
*
**
* Shard in which this file is created
*
*
* .proto.ShardID shardID = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder>
getShardIDFieldBuilder() {
if (shardIDBuilder_ == null) {
shardIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder>(
getShardID(),
getParentForChildren(),
isClean());
shardID_ = null;
}
return shardIDBuilder_;
}
private com.hedera.hashgraph.sdk.proto.RealmID realmID_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder> realmIDBuilder_;
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
* @return Whether the realmID field is set.
*/
public boolean hasRealmID() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
* @return The realmID.
*/
public com.hedera.hashgraph.sdk.proto.RealmID getRealmID() {
if (realmIDBuilder_ == null) {
return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_;
} else {
return realmIDBuilder_.getMessage();
}
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public Builder setRealmID(com.hedera.hashgraph.sdk.proto.RealmID value) {
if (realmIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
realmID_ = value;
} else {
realmIDBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public Builder setRealmID(
com.hedera.hashgraph.sdk.proto.RealmID.Builder builderForValue) {
if (realmIDBuilder_ == null) {
realmID_ = builderForValue.build();
} else {
realmIDBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public Builder mergeRealmID(com.hedera.hashgraph.sdk.proto.RealmID value) {
if (realmIDBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
realmID_ != null &&
realmID_ != com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance()) {
getRealmIDBuilder().mergeFrom(value);
} else {
realmID_ = value;
}
} else {
realmIDBuilder_.mergeFrom(value);
}
if (realmID_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public Builder clearRealmID() {
bitField0_ = (bitField0_ & ~0x00000010);
realmID_ = null;
if (realmIDBuilder_ != null) {
realmIDBuilder_.dispose();
realmIDBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public com.hedera.hashgraph.sdk.proto.RealmID.Builder getRealmIDBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getRealmIDFieldBuilder().getBuilder();
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
public com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder getRealmIDOrBuilder() {
if (realmIDBuilder_ != null) {
return realmIDBuilder_.getMessageOrBuilder();
} else {
return realmID_ == null ?
com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_;
}
}
/**
*
**
* The Realm in which to the file is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder>
getRealmIDFieldBuilder() {
if (realmIDBuilder_ == null) {
realmIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder>(
getRealmID(),
getParentForChildren(),
isClean());
realmID_ = null;
}
return realmIDBuilder_;
}
private com.hedera.hashgraph.sdk.proto.Key newRealmAdminKey_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> newRealmAdminKeyBuilder_;
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
* @return Whether the newRealmAdminKey field is set.
*/
public boolean hasNewRealmAdminKey() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
* @return The newRealmAdminKey.
*/
public com.hedera.hashgraph.sdk.proto.Key getNewRealmAdminKey() {
if (newRealmAdminKeyBuilder_ == null) {
return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_;
} else {
return newRealmAdminKeyBuilder_.getMessage();
}
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public Builder setNewRealmAdminKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (newRealmAdminKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
newRealmAdminKey_ = value;
} else {
newRealmAdminKeyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public Builder setNewRealmAdminKey(
com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) {
if (newRealmAdminKeyBuilder_ == null) {
newRealmAdminKey_ = builderForValue.build();
} else {
newRealmAdminKeyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public Builder mergeNewRealmAdminKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (newRealmAdminKeyBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
newRealmAdminKey_ != null &&
newRealmAdminKey_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) {
getNewRealmAdminKeyBuilder().mergeFrom(value);
} else {
newRealmAdminKey_ = value;
}
} else {
newRealmAdminKeyBuilder_.mergeFrom(value);
}
if (newRealmAdminKey_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public Builder clearNewRealmAdminKey() {
bitField0_ = (bitField0_ & ~0x00000020);
newRealmAdminKey_ = null;
if (newRealmAdminKeyBuilder_ != null) {
newRealmAdminKeyBuilder_.dispose();
newRealmAdminKeyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public com.hedera.hashgraph.sdk.proto.Key.Builder getNewRealmAdminKeyBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getNewRealmAdminKeyFieldBuilder().getBuilder();
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getNewRealmAdminKeyOrBuilder() {
if (newRealmAdminKeyBuilder_ != null) {
return newRealmAdminKeyBuilder_.getMessageOrBuilder();
} else {
return newRealmAdminKey_ == null ?
com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_;
}
}
/**
*
**
* If realmID is null, then this the admin key for the new realm that will be created
*
*
* .proto.Key newRealmAdminKey = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>
getNewRealmAdminKeyFieldBuilder() {
if (newRealmAdminKeyBuilder_ == null) {
newRealmAdminKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>(
getNewRealmAdminKey(),
getParentForChildren(),
isClean());
newRealmAdminKey_ = null;
}
return newRealmAdminKeyBuilder_;
}
private java.lang.Object memo_ = "";
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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_ |= 0x00000040;
onChanged();
return this;
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 8;
* @return This builder for chaining.
*/
public Builder clearMemo() {
memo_ = getDefaultInstance().getMemo();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 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_ |= 0x00000040;
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:proto.FileCreateTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.FileCreateTransactionBody)
private static final com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody();
}
public static com.hedera.hashgraph.sdk.proto.FileCreateTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FileCreateTransactionBody 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.FileCreateTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}