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 ( |
name
string
The resource name of the asset, in the form of: projects/{project}/locations/{location}/assets/{assetId}
.
createTime
string (
Timestamp
format)
Output only. The creation time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
updateTime
string (
Timestamp
format)
Output only. The update time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
labels
map (key: string, value: string)
User-defined key/value metadata.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
crc32c
string
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 VideoAsset.uri
or ImageAsset.uri
. If crc32c is set, the asset can't be created if the crc32c value does not match with the crc32c checksum of the Cloud Storage object indicated by VideoAsset.uri
or ImageAsset.uri
.
state
enum (
State
)
Output only. The state of the asset resource.
error
object (
Status
)
Output only. Only present when state
is ERROR
. The reason for the error state of the asset.
resource
. The reference to the asset. The maximum size of the resource is 250 MB. resource
can be only one of the following:video
object (
VideoAsset
)
VideoAsset represents a video.
image
object (
ImageAsset
)
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. |