java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<File,File.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<File,File.Builder>
com.hedera.hashgraph.sdk.proto.File.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,FileOrBuilder,Cloneable
- Enclosing class:
File
public static final class File.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<File,File.Builder>
implements FileOrBuilder
* Representation of an Hedera File Service `file`. Files offer a place to store additional data, much more than is available in other entities, for use with smart contracts, non-fungible tokens, etc... As with all network entities, a file has a unique entity number, which is given along with the network's shard and realm in the form of a shard.realm.number id.Protobuf type
proto.File-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* The contents of the file.* A flag indicating that this file is deleted.* The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration.* This file's ID within the global network state.* A list of keys that MUST sign any transaction to create or update this file.* A short description of the file.* The pre-system-delete expiration time of a deleted "system" file, in seconds.com.google.protobuf.ByteString* The contents of the file.boolean* A flag indicating that this file is deleted.long* The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration.* This file's ID within the global network state.getKeys()* A list of keys that MUST sign any transaction to create or update this file.getMemo()* A short description of the file.com.google.protobuf.ByteString* A short description of the file.long* The pre-system-delete expiration time of a deleted "system" file, in seconds.boolean* This file's ID within the global network state.booleanhasKeys()* A list of keys that MUST sign any transaction to create or update this file.mergeFileId(FileID value) * This file's ID within the global network state.* A list of keys that MUST sign any transaction to create or update this file.setContents(com.google.protobuf.ByteString value) * The contents of the file.setDeleted(boolean value) * A flag indicating that this file is deleted.setExpirationSecond(long value) * The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration.* This file's ID within the global network state.setFileId(FileID.Builder builderForValue) * This file's ID within the global network state.* A list of keys that MUST sign any transaction to create or update this file.setKeys(KeyList.Builder builderForValue) * A list of keys that MUST sign any transaction to create or update this file.* A short description of the file.setMemoBytes(com.google.protobuf.ByteString value) * A short description of the file.setPreSystemDeleteExpirationSecond(long value) * The pre-system-delete expiration time of a deleted "system" file, in seconds.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasFileId
public boolean hasFileId()* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1;- Specified by:
hasFileIdin interfaceFileOrBuilder- Returns:
- Whether the fileId field is set.
-
getFileId
* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1;- Specified by:
getFileIdin interfaceFileOrBuilder- Returns:
- The fileId.
-
setFileId
* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1; -
setFileId
* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1; -
mergeFileId
* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1; -
clearFileId
* This file's ID within the global network state. <p> This value SHALL be unique within the network.
.proto.FileID file_id = 1; -
getExpirationSecond
public long getExpirationSecond()* The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
int64 expiration_second = 2;- Specified by:
getExpirationSecondin interfaceFileOrBuilder- Returns:
- The expirationSecond.
-
setExpirationSecond
* The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
int64 expiration_second = 2;- Parameters:
value- The expirationSecond to set.- Returns:
- This builder for chaining.
-
clearExpirationSecond
* The file's expiration time in seconds since the epoch.<br/> This value should be compared against consensus time, which may not exactly match clock time at the moment of expiration. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
int64 expiration_second = 2;- Returns:
- This builder for chaining.
-
hasKeys
public boolean hasKeys()* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3;- Specified by:
hasKeysin interfaceFileOrBuilder- Returns:
- Whether the keys field is set.
-
getKeys
* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3;- Specified by:
getKeysin interfaceFileOrBuilder- Returns:
- The keys.
-
setKeys
* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3; -
setKeys
* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3; -
mergeKeys
* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3; -
clearKeys
* A list of keys that MUST sign any transaction to create or update this file. <p> Only _one_ of these keys must sign a transaction to delete the file.<br/> This field MAY be `null` or an empty list.<br/> If this field is null or an empty `KeyList`, then the file SHALL be immutable.<br/> For an immutable file, the only transaction permitted to modify that file SHALL be a `fileUpdate` transaction with _only_ the `expirationTime` set.
.proto.KeyList keys = 3; -
getContents
public com.google.protobuf.ByteString getContents()* The contents of the file. <p> This SHALL be limited to the current maximum file size; typically no more than 1 Megabyte (1048576 bytes).
bytes contents = 4;- Specified by:
getContentsin interfaceFileOrBuilder- Returns:
- The contents.
-
setContents
* The contents of the file. <p> This SHALL be limited to the current maximum file size; typically no more than 1 Megabyte (1048576 bytes).
bytes contents = 4;- Parameters:
value- The contents to set.- Returns:
- This builder for chaining.
-
clearContents
* The contents of the file. <p> This SHALL be limited to the current maximum file size; typically no more than 1 Megabyte (1048576 bytes).
bytes contents = 4;- Returns:
- This builder for chaining.
-
getMemo
* A short description of the file. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 5;- Specified by:
getMemoin interfaceFileOrBuilder- Returns:
- The memo.
-
getMemoBytes
public com.google.protobuf.ByteString getMemoBytes()* A short description of the file. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 5;- Specified by:
getMemoBytesin interfaceFileOrBuilder- Returns:
- The bytes for memo.
-
setMemo
* A short description of the file. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 5;- Parameters:
value- The memo to set.- Returns:
- This builder for chaining.
-
clearMemo
* A short description of the file. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 5;- Returns:
- This builder for chaining.
-
setMemoBytes
* A short description of the file. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 5;- Parameters:
value- The bytes for memo to set.- Returns:
- This builder for chaining.
-
getDeleted
public boolean getDeleted()* A flag indicating that this file is deleted. <p> The `contents` of a deleted "regular" file SHALL be an empty (zero length) bytes.
bool deleted = 6;- Specified by:
getDeletedin interfaceFileOrBuilder- Returns:
- The deleted.
-
setDeleted
* A flag indicating that this file is deleted. <p> The `contents` of a deleted "regular" file SHALL be an empty (zero length) bytes.
bool deleted = 6;- Parameters:
value- The deleted to set.- Returns:
- This builder for chaining.
-
clearDeleted
* A flag indicating that this file is deleted. <p> The `contents` of a deleted "regular" file SHALL be an empty (zero length) bytes.
bool deleted = 6;- Returns:
- This builder for chaining.
-
getPreSystemDeleteExpirationSecond
public long getPreSystemDeleteExpirationSecond()* The pre-system-delete expiration time of a deleted "system" file, in seconds. <p> This field SHALL contain the original expiration time of a "system" file that is deleted. This SHOULD be used to restore that expiration time if the file is subsequently "un-deleted" before it is purged from the system.<br/> A "regular" file cannot be "un-deleted", so this field SHALL NOT be set for those files.
int64 pre_system_delete_expiration_second = 7;- Specified by:
getPreSystemDeleteExpirationSecondin interfaceFileOrBuilder- Returns:
- The preSystemDeleteExpirationSecond.
-
setPreSystemDeleteExpirationSecond
* The pre-system-delete expiration time of a deleted "system" file, in seconds. <p> This field SHALL contain the original expiration time of a "system" file that is deleted. This SHOULD be used to restore that expiration time if the file is subsequently "un-deleted" before it is purged from the system.<br/> A "regular" file cannot be "un-deleted", so this field SHALL NOT be set for those files.
int64 pre_system_delete_expiration_second = 7;- Parameters:
value- The preSystemDeleteExpirationSecond to set.- Returns:
- This builder for chaining.
-
clearPreSystemDeleteExpirationSecond
* The pre-system-delete expiration time of a deleted "system" file, in seconds. <p> This field SHALL contain the original expiration time of a "system" file that is deleted. This SHOULD be used to restore that expiration time if the file is subsequently "un-deleted" before it is purged from the system.<br/> A "regular" file cannot be "un-deleted", so this field SHALL NOT be set for those files.
int64 pre_system_delete_expiration_second = 7;- Returns:
- This builder for chaining.
-