# Class Event (1.17.0)

1.17.0 (latest) 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.8.1 1.7.4 1.6.0 1.5.2 1.4.1 1.3.0 1.2.1 1.1.0 1.0.4 0.2.0 0.1.5

    Event(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` The resource name of the event, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The creation time. |
| `update_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The update time. |
| `labels` | `MutableMapping[str, str]` User-defined key/value metadata. |
| `input_switch` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.InputSwitchTask` Switches to another input stream. This field is a member of `oneof`_ `task`. |
| `ad_break` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.AdBreakTask` Inserts a new ad opportunity. This field is a member of `oneof`_ `task`. |
| `return_to_program` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.ReturnToProgramTask` Stops any running ad break. This field is a member of `oneof`_ `task`. |
| `slate` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.SlateTask` Inserts a slate. This field is a member of `oneof`_ `task`. |
| `mute` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.MuteTask` Mutes the stream. This field is a member of `oneof`_ `task`. |
| `unmute` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.UnmuteTask` Unmutes the stream. This field is a member of `oneof`_ `task`. |
| `update_encryptions` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.UpdateEncryptionsTask` Updates encryption settings. This field is a member of `oneof`_ `task`. |
| `execute_now` | `bool` 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 will be populated with the time that the server actually schedules the event. |
| `execution_time` | `google.protobuf.timestamp_pb2.Timestamp` The time to execute the event. If you set execute_now 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 to `false`, then you must set this field to at least 10 seconds in the future or else the event can't be created. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/livestream/latest/google.cloud.video.live_stream_v1.types.Event.State` Output only. The state of the event. |
| `error` | `google.rpc.status_pb2.Status` Output only. An error object that describes the reason for the failure. This property is always present when `state` is `FAILED`. |

## Classes

### AdBreakTask

    AdBreakTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Inserts a new ad opportunity.

### InputSwitchTask

    InputSwitchTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Switches to another input stream. Automatic failover is then
disabled.

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### MuteTask

    MuteTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Mutes the stream.

### ReturnToProgramTask

    ReturnToProgramTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Stops any events which are currently running. This only
applies to events with a duration.

### SlateTask

    SlateTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Inserts a slate.

### State

    State(value)

State of the event

### UnmuteTask

    UnmuteTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Unmutes the stream. The task fails if the stream is not
currently muted.

### UpdateEncryptionsTask

    UpdateEncryptionsTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Update encryption settings.