java.lang.Object
com.google.protobuf.AbstractMessageLite<File,File.Builder>
com.google.protobuf.GeneratedMessageLite<File,File.Builder>
com.hedera.hashgraph.sdk.proto.File
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, FileOrBuilder

@Generated public final class File extends com.google.protobuf.GeneratedMessageLite<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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * Representation of an Hedera File Service `file`.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    com.google.protobuf.ByteString
    * The contents of the file.
    static 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.
    * A list of keys that MUST sign any transaction to create or update this file.
    * 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.
    boolean
    * A list of keys that MUST sign any transaction to create or update this file.
     
    newBuilder(File prototype)
     
    static File
     
    static File
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static File
    parseFrom(byte[] data)
     
    static File
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static File
    parseFrom(com.google.protobuf.ByteString data)
     
    static File
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static File
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static File
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static File
     
    static File
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static File
     
    static File
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<File>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • FILE_ID_FIELD_NUMBER

      public static final int FILE_ID_FIELD_NUMBER
      See Also:
    • EXPIRATION_SECOND_FIELD_NUMBER

      public static final int EXPIRATION_SECOND_FIELD_NUMBER
      See Also:
    • KEYS_FIELD_NUMBER

      public static final int KEYS_FIELD_NUMBER
      See Also:
    • CONTENTS_FIELD_NUMBER

      public static final int CONTENTS_FIELD_NUMBER
      See Also:
    • MEMO_FIELD_NUMBER

      public static final int MEMO_FIELD_NUMBER
      See Also:
    • DELETED_FIELD_NUMBER

      public static final int DELETED_FIELD_NUMBER
      See Also:
    • PRE_SYSTEM_DELETE_EXPIRATION_SECOND_FIELD_NUMBER

      public static final int PRE_SYSTEM_DELETE_EXPIRATION_SECOND_FIELD_NUMBER
      See Also:
  • 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:
      hasFileId in interface FileOrBuilder
      Returns:
      Whether the fileId field is set.
    • getFileId

      public FileID 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:
      getFileId in interface FileOrBuilder
      Returns:
      The fileId.
    • 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:
      getExpirationSecond in interface FileOrBuilder
      Returns:
      The expirationSecond.
    • 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:
      hasKeys in interface FileOrBuilder
      Returns:
      Whether the keys field is set.
    • getKeys

      public KeyList 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:
      getKeys in interface FileOrBuilder
      Returns:
      The keys.
    • 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:
      getContents in interface FileOrBuilder
      Returns:
      The contents.
    • getMemo

      public String 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:
      getMemo in interface FileOrBuilder
      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:
      getMemoBytes in interface FileOrBuilder
      Returns:
      The bytes for memo.
    • 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:
      getDeleted in interface FileOrBuilder
      Returns:
      The deleted.
    • 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:
      getPreSystemDeleteExpirationSecond in interface FileOrBuilder
      Returns:
      The preSystemDeleteExpirationSecond.
    • parseFrom

      public static File parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static File parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static File parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static File parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static File parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static File parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static File parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static File.Builder newBuilder()
    • newBuilder

      public static File.Builder newBuilder(File prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<File,File.Builder>
    • getDefaultInstance

      public static File getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<File> parser()