Resource: Asset
An asset represents a video or an image.
JSON representation |
---|
{ "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "crc32c": string, "state": enum ( |
Fields | |
---|---|
name |
The resource name of the asset, in the form of: |
createTime |
Output only. The creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
User-defined key/value metadata. An object containing a list of |
crc32c |
Based64-encoded CRC32c checksum of the asset file. For more information, see the crc32c checksum of the Cloud Storage Objects resource. If crc32c is omitted or left empty when the asset is created, this field is filled by the crc32c checksum of the Cloud Storage object indicated by |
state |
Output only. The state of the asset resource. |
error |
Output only. Only present when |
Union field resource . The reference to the asset. The maximum size of the resource is 250 MB. resource can be only one of the following: |
|
video |
VideoAsset represents a video. |
image |
ImageAsset represents an image. |
VideoAsset
VideoAsset represents a video. The supported formats are MP4, MPEG-TS, and FLV. The supported video codec is H264. The supported audio codecs are AAC, AC3, MP2, and MP3.
JSON representation |
---|
{ "uri": string } |
Fields | |
---|---|
uri |
Cloud Storage URI of the video. The format is |
ImageAsset
Image represents an image. The supported formats are JPEG, PNG.
JSON representation |
---|
{ "uri": string } |
Fields | |
---|---|
uri |
Cloud Storage URI of the image. The format is |
State
State of the asset resource.
Enums | |
---|---|
STATE_UNSPECIFIED |
State is not specified. |
CREATING |
The asset is being created. |
ACTIVE |
The asset is ready for use. |
DELETING |
The asset is being deleted. |
ERROR |
The asset has an error. |
Methods |
|
---|---|
|
Creates a Asset with the provided unique ID in the specified region. |
|
Deletes the specified asset if it is not used. |
|
Returns the specified asset. |
|
Returns a list of all assets in the specified region. |