Class GoogleFile
A file uploaded to the API.
public class GoogleFile : IUploadedFile, IProviderData, IData
- Inheritance
-
objectGoogleFile
- Implements
-
IData
- Extension Methods
Properties
Api
public Api Api { get; }
Property Value
ByteSize
Output only.
Size of the GoogleFile in bytes.
public int ByteSize { get; set; }
Property Value
- int
CreateTime
Output only.
The timestamp of when the GoogleFile was created.
public ZuluTime? CreateTime { get; set; }
Property Value
- ZuluTime?
CreatedAt
Gets the timestamp of when the file was created on the provider’s system.
- Uses UnixTime for consistency across APIs.
- Often represents the original upload time.
public UnixTime CreatedAt { get; }
Property Value
- UnixTime
DownloadUri
public string DownloadUri { get; set; }
Property Value
- string
Error
Output only.
Error status if GoogleFile processing failed.
public Status Error { get; set; }
Property Value
ExpirationTime
Output only.
The timestamp of when the GoogleFile will be deleted. Only set if the GoogleFile is scheduled to expire.
public ZuluTime? ExpirationTime { get; set; }
Property Value
- ZuluTime?
ExpiresAt
Gets the timestamp when the file will expire (if applicable).
- Some providers set expiration dates for temporary files.
- May return
nullif the file does not expire.
public UnixTime ExpiresAt { get; }
Property Value
- UnixTime
Id
Immutable. Identifier.
The GoogleFile resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-).
The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated.
Example: files/123-456
public string Id { get; set; }
Property Value
- string
MimeType
Gets the MIME type of the file as detected or declared during upload.
- Examples:
application/json,image/png,audio/wav. - Can be used to determine how to process or preview the file.
public MimeType MimeType { get; }
Property Value
- MimeType
MimeTypeAsString
Output only.
MIME type of the GoogleFile.
public string MimeTypeAsString { get; set; }
Property Value
- string
Name
Optional.
The human-readable display name for the GoogleFile. The display name must be no more than 512 characters in length, including spaces. Example: "Welcome Image"
public string Name { get; set; }
Property Value
- string
Sha256Hash
Output only.
SHA-256 hash of the uploaded bytes.
public string Sha256Hash { get; set; }
Property Value
- string
Remarks
A base64-encoded string.
Source
public GoogleFileSource? Source { get; set; }
Property Value
State
Output only.
Processing state of the GoogleFile.
public FileState State { get; set; }
Property Value
UpdateTime
Output only.
The timestamp of when the GoogleFile was last updated.
public ZuluTime? UpdateTime { get; set; }
Property Value
- ZuluTime?
Uri
Output only.
The uri of the GoogleFile.
public string Uri { get; set; }
Property Value
- string
VideoMetadata
Output only.
Metadata for a video.
public VideoMetadata VideoMetadata { get; set; }
Property Value
Methods
GetMetadata()
Builds a serializable metadata object for this file.
- Encapsulates file properties for persistence or logging.
- Useful for caching file data locally or transmitting through APIs.
public SerializableMetadata GetMetadata()
Returns
- SerializableMetadata