# Live Stream V1 API - Class Google::Cloud::Video::LiveStream::V1::Asset (v2.7.0)

2.7.0 (latest) 2.6.0 2.5.1 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.3.0 1.2.0 1.1.1 1.0.0 0.9.0 0.8.2 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Live Stream V1 API class Google::Cloud::Video::LiveStream::V1::Asset.

An asset represents a video or an image.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #crc32c

    def crc32c() -> ::String

**Returns**

- (::String) --- Based64-encoded CRC32c checksum of the asset file. For more information, see the crc32c checksum of the [Cloud Storage Objects
  resource](https://cloud.google.com/storage/docs/json_api/v1/objects). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)"). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)").

### #crc32c=

    def crc32c=(value) -> ::String

**Parameter**

- **value** (::String) --- Based64-encoded CRC32c checksum of the asset file. For more information, see the crc32c checksum of the [Cloud Storage Objects
  resource](https://cloud.google.com/storage/docs/json_api/v1/objects). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)"). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)").
**Returns**

- (::String) --- Based64-encoded CRC32c checksum of the asset file. For more information, see the crc32c checksum of the [Cloud Storage Objects
  resource](https://cloud.google.com/storage/docs/json_api/v1/objects). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)"). 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset#Google__Cloud__Video__LiveStream__V1__Asset__VideoAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset#uri (method)") or [ImageAsset.uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset#Google__Cloud__Video__LiveStream__V1__Asset__ImageAsset_uri_instance_ "Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset#uri (method)").

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The creation time.

### #error

    def error() -> ::Google::Rpc::Status

**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Rpc-Status)) --- Output only. Only present when `state` is `ERROR`. The reason for the error state of the asset.

### #image

    def image() -> ::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset)) --- ImageAsset represents an image.


  Note: The following fields are mutually exclusive: `image`, `video`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #image=

    def image=(value) -> ::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset)) --- ImageAsset represents an image.


  Note: The following fields are mutually exclusive: `image`, `video`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Asset::ImageAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-ImageAsset)) --- ImageAsset represents an image.


  Note: The following fields are mutually exclusive: `image`, `video`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined key/value metadata.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined key/value metadata.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- User-defined key/value metadata.

### #name

    def name() -> ::String

**Returns**

- (::String) --- The resource name of the asset, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The resource name of the asset, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.
**Returns**

- (::String) --- The resource name of the asset, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.

### #state

    def state() -> ::Google::Cloud::Video::LiveStream::V1::Asset::State

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Asset::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-State)) --- Output only. The state of the asset resource.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The update time.

### #video

    def video() -> ::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset)) --- VideoAsset represents a video.


  Note: The following fields are mutually exclusive: `video`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #video=

    def video=(value) -> ::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset)) --- VideoAsset represents a video.


  Note: The following fields are mutually exclusive: `video`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Asset::VideoAsset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Asset-VideoAsset)) --- VideoAsset represents a video.


  Note: The following fields are mutually exclusive: `video`, `image`. If a field in that set is populated, all other fields in the set will automatically be cleared.