Class FileUpdateTransactionBody.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<FileUpdateTransactionBody,FileUpdateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<FileUpdateTransactionBody,FileUpdateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.FileUpdateTransactionBody.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, FileUpdateTransactionBodyOrBuilder, Cloneable
Enclosing class:
FileUpdateTransactionBody

public static final class FileUpdateTransactionBody.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<FileUpdateTransactionBody,FileUpdateTransactionBody.Builder> implements FileUpdateTransactionBodyOrBuilder
 *
 Update the metadata, and/or replace the content, of a file in the
 Hedera File Service (HFS).

 Any field which is not set (i.e. is null) in this message, other than
 `fileID`, SHALL be ignored.<br/>
 If the `keys` list for the identified file is an empty `KeyList`, then
 this message MUST NOT set any field except `expirationTime`.

 #### Signature Requirements
 Every `Key` in the `keys` list for the identified file MUST sign this
 transaction, if any field other than `expirationTime` is to be updated.<br/>
 If the `keys` list for the identified file is an empty `KeyList` (because
 this file was previously created or updated to have an empty `KeyList`),
 then the file is considered immutable and this message MUST NOT set any
 field except `expirationTime`.<br/>
 See the [File Service](#FileService) specification for a detailed
 explanation of the signature requirements for all file transactions.

 ### Block Stream Effects
 None
 
Protobuf type proto.FileUpdateTransactionBody
  • Method Details

    • hasFileID

      public boolean hasFileID()
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
      Specified by:
      hasFileID in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      Whether the fileID field is set.
    • getFileID

      public FileID getFileID()
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
      Specified by:
      getFileID in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      The fileID.
    • setFileID

      public FileUpdateTransactionBody.Builder setFileID(FileID value)
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
    • setFileID

      public FileUpdateTransactionBody.Builder setFileID(FileID.Builder builderForValue)
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
    • mergeFileID

      public FileUpdateTransactionBody.Builder mergeFileID(FileID value)
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
    • clearFileID

      public FileUpdateTransactionBody.Builder clearFileID()
       *
       A file identifier for the file to update.
       <p>
       This field is REQUIRED.
       
      .proto.FileID fileID = 1;
    • hasExpirationTime

      public boolean hasExpirationTime()
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
      Specified by:
      hasExpirationTime in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      Whether the expirationTime field is set.
    • getExpirationTime

      public Timestamp getExpirationTime()
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
      Specified by:
      getExpirationTime in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      The expirationTime.
    • setExpirationTime

      public FileUpdateTransactionBody.Builder setExpirationTime(Timestamp value)
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
    • setExpirationTime

      public FileUpdateTransactionBody.Builder setExpirationTime(Timestamp.Builder builderForValue)
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
    • mergeExpirationTime

      public FileUpdateTransactionBody.Builder mergeExpirationTime(Timestamp value)
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
    • clearExpirationTime

      public FileUpdateTransactionBody.Builder clearExpirationTime()
       *
       An expiration timestamp.
       <p>
       If set, this value MUST be strictly later than the existing
       `expirationTime` value, or else it will be ignored.<br/>
       If set, this value SHALL replace the existing `expirationTime`.<br/>
       If this field is the only field set, then this transaction SHALL NOT
       require any signature other than the `payer` for the transaction.<br/>
       When the network consensus time exceeds the then-current
       `expirationTime`, the network SHALL expire the file.
       
      .proto.Timestamp expirationTime = 2;
    • hasKeys

      public boolean hasKeys()
       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
      Specified by:
      hasKeys in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      Whether the keys field is set.
    • getKeys

      public KeyList getKeys()
       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
      Specified by:
      getKeys in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      The keys.
    • setKeys

       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
    • setKeys

      public FileUpdateTransactionBody.Builder setKeys(KeyList.Builder builderForValue)
       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
    • mergeKeys

      public FileUpdateTransactionBody.Builder mergeKeys(KeyList value)
       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
    • clearKeys

       *
       The new list of keys that "own" this file.
       <p>
       If set, every key in this `KeyList` MUST sign this transaction.<br/>
       If set, every key in the _previous_ `KeyList` MUST _also_
       sign this transaction.<br/>
       If this value is an empty `KeyList`, then the file SHALL be immutable
       after completion of this transaction.
       
      .proto.KeyList keys = 3;
    • getContents

      public com.google.protobuf.ByteString getContents()
       *
       An array of bytes.
       <p>
       This value, if set, SHALL _replace_ the existing file content.
       If this value is set to an empty byte array, the content of the file
       SHALL be unchanged.
       
      bytes contents = 4;
      Specified by:
      getContents in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      The contents.
    • setContents

      public FileUpdateTransactionBody.Builder setContents(com.google.protobuf.ByteString value)
       *
       An array of bytes.
       <p>
       This value, if set, SHALL _replace_ the existing file content.
       If this value is set to an empty byte array, the content of the file
       SHALL be unchanged.
       
      bytes contents = 4;
      Parameters:
      value - The contents to set.
      Returns:
      This builder for chaining.
    • clearContents

      public FileUpdateTransactionBody.Builder clearContents()
       *
       An array of bytes.
       <p>
       This value, if set, SHALL _replace_ the existing file content.
       If this value is set to an empty byte array, the content of the file
       SHALL be unchanged.
       
      bytes contents = 4;
      Returns:
      This builder for chaining.
    • hasMemo

      public boolean hasMemo()
       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;
      Specified by:
      hasMemo in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      Whether the memo field is set.
    • getMemo

      public com.google.protobuf.StringValue getMemo()
       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;
      Specified by:
      getMemo in interface FileUpdateTransactionBodyOrBuilder
      Returns:
      The memo.
    • setMemo

      public FileUpdateTransactionBody.Builder setMemo(com.google.protobuf.StringValue value)
       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;
    • setMemo

      public FileUpdateTransactionBody.Builder setMemo(com.google.protobuf.StringValue.Builder builderForValue)
       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;
    • mergeMemo

      public FileUpdateTransactionBody.Builder mergeMemo(com.google.protobuf.StringValue value)
       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;
    • clearMemo

       *
       A short description of this file.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memo = 5;