# Live Stream V1 API - Class Google::Cloud::Video::LiveStream::V1::Event (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::Event.

Event is a sub-resource of a channel, which can be scheduled by the user to
execute operations on a channel resource without having to stop the channel.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #ad_break

    def ad_break() -> ::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-AdBreakTask)) --- Inserts a new ad opportunity.


  Note: The following fields are mutually exclusive: `ad_break`, `input_switch`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #ad_break=

    def ad_break=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-AdBreakTask)) --- Inserts a new ad opportunity.


  Note: The following fields are mutually exclusive: `ad_break`, `input_switch`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::AdBreakTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-AdBreakTask)) --- Inserts a new ad opportunity.


  Note: The following fields are mutually exclusive: `ad_break`, `input_switch`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #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. An error object that describes the reason for the failure. This property is always present when `state` is `FAILED`.

### #execute_now

    def execute_now() -> ::Boolean

**Returns**

- (::Boolean) --- When this field is set to true, the event will be executed at the earliest time that the server can schedule the event and [execution_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execution_time_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execution_time (method)") will be populated with the time that the server actually schedules the event.

### #execute_now=

    def execute_now=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- When this field is set to true, the event will be executed at the earliest time that the server can schedule the event and [execution_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execution_time_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execution_time (method)") will be populated with the time that the server actually schedules the event.
**Returns**

- (::Boolean) --- When this field is set to true, the event will be executed at the earliest time that the server can schedule the event and [execution_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execution_time_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execution_time (method)") will be populated with the time that the server actually schedules the event.

### #execution_time

    def execution_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)) --- The time to execute the event. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `true`, then do not set this field in the `CreateEvent` request. In this case, the server schedules the event and populates this field. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `false`, then you must set this field to at least 10 seconds in the future or else the event can't be created.

### #execution_time=

    def execution_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Timestamp)) --- The time to execute the event. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `true`, then do not set this field in the `CreateEvent` request. In this case, the server schedules the event and populates this field. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `false`, then you must set this field to at least 10 seconds in the future or else the event can't be created.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Protobuf-Timestamp)) --- The time to execute the event. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `true`, then do not set this field in the `CreateEvent` request. In this case, the server schedules the event and populates this field. If you set [execute_now](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event#Google__Cloud__Video__LiveStream__V1__Event_execute_now_instance_ "Google::Cloud::Video::LiveStream::V1::Event#execute_now (method)") to `false`, then you must set this field to at least 10 seconds in the future or else the event can't be created.

### #input_switch

    def input_switch() -> ::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-InputSwitchTask)) --- Switches to another input stream.


  Note: The following fields are mutually exclusive: `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #input_switch=

    def input_switch=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-InputSwitchTask)) --- Switches to another input stream.


  Note: The following fields are mutually exclusive: `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::InputSwitchTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-InputSwitchTask)) --- Switches to another input stream.


  Note: The following fields are mutually exclusive: `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`, `update_encryptions`. 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.

### #mute

    def mute() -> ::Google::Cloud::Video::LiveStream::V1::Event::MuteTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::MuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-MuteTask)) --- Mutes the stream.


  Note: The following fields are mutually exclusive: `mute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #mute=

    def mute=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::MuteTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::MuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-MuteTask)) --- Mutes the stream.


  Note: The following fields are mutually exclusive: `mute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::MuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-MuteTask)) --- Mutes the stream.


  Note: The following fields are mutually exclusive: `mute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #name

    def name() -> ::String

**Returns**

- (::String) --- The resource name of the event, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The resource name of the event, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
**Returns**

- (::String) --- The resource name of the event, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.

### #return_to_program

    def return_to_program() -> ::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-ReturnToProgramTask)) --- Stops any running ad break.


  Note: The following fields are mutually exclusive: `return_to_program`, `input_switch`, `ad_break`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #return_to_program=

    def return_to_program=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-ReturnToProgramTask)) --- Stops any running ad break.


  Note: The following fields are mutually exclusive: `return_to_program`, `input_switch`, `ad_break`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::ReturnToProgramTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-ReturnToProgramTask)) --- Stops any running ad break.


  Note: The following fields are mutually exclusive: `return_to_program`, `input_switch`, `ad_break`, `slate`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #slate

    def slate() -> ::Google::Cloud::Video::LiveStream::V1::Event::SlateTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::SlateTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-SlateTask)) --- Inserts a slate.


  Note: The following fields are mutually exclusive: `slate`, `input_switch`, `ad_break`, `return_to_program`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #slate=

    def slate=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::SlateTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::SlateTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-SlateTask)) --- Inserts a slate.


  Note: The following fields are mutually exclusive: `slate`, `input_switch`, `ad_break`, `return_to_program`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::SlateTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-SlateTask)) --- Inserts a slate.


  Note: The following fields are mutually exclusive: `slate`, `input_switch`, `ad_break`, `return_to_program`, `mute`, `unmute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #state

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

**Returns**

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

### #unmute

    def unmute() -> ::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UnmuteTask)) --- Unmutes the stream.


  Note: The following fields are mutually exclusive: `unmute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #unmute=

    def unmute=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UnmuteTask)) --- Unmutes the stream.


  Note: The following fields are mutually exclusive: `unmute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::UnmuteTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UnmuteTask)) --- Unmutes the stream.


  Note: The following fields are mutually exclusive: `unmute`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `update_encryptions`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #update_encryptions

    def update_encryptions() -> ::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask

**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UpdateEncryptionsTask)) --- Updates encryption settings.


  Note: The following fields are mutually exclusive: `update_encryptions`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #update_encryptions=

    def update_encryptions=(value) -> ::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask

**Parameter**

- **value** ([::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UpdateEncryptionsTask)) --- Updates encryption settings.


  Note: The following fields are mutually exclusive: `update_encryptions`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Video::LiveStream::V1::Event::UpdateEncryptionsTask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-video-live_stream-v1/latest/Google-Cloud-Video-LiveStream-V1-Event-UpdateEncryptionsTask)) --- Updates encryption settings.


  Note: The following fields are mutually exclusive: `update_encryptions`, `input_switch`, `ad_break`, `return_to_program`, `slate`, `mute`, `unmute`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #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.