- Resource: Event
- InputSwitchTask
- AdBreakTask
- ReturnToProgramTask
- SlateTask
- MuteTask
- UnmuteTask
- UpdateEncryptionsTask
- EncryptionUpdate
- State
- Methods
Resource: 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.
| JSON representation | 
|---|
| { "name" : string , "createTime" : string , "updateTime" : string , "labels" : { string : string , ... } , "executeNow" : boolean , "executionTime" : string , "state" : enum ( | 
name 
 string 
The resource name of the event, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId} 
.
createTime 
 string (  
 Timestamp 
 
format)
Output only. The creation time.
Uses RFC 3339, where generated output will always be Z-normalized and use 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 use 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" } 
.
executeNow 
 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  executionTime 
 
will be populated with the time that the server actually schedules the event.
executionTime 
 string (  
 Timestamp 
 
format)
The time to execute the event. If you set  executeNow 
 
to true 
, then do not set this field in the events.create 
request. In this case, the server schedules the event and populates this field. If you set  executeNow 
 
to false 
, then you must set this field to at least 10 seconds in the future or else the event can't be created.
Uses RFC 3339, where generated output will always be Z-normalized and use 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" 
.
state 
 enum (  
 State 
 
)
Output only. The state of the event.
error 
 object (  
 Status 
 
)
Output only. An error object that describes the reason for the failure. This property is always present when state 
is FAILED 
.
task 
. Required. Operation to be executed by this event. task 
can be only one of the following:inputSwitch 
 object (  
 InputSwitchTask 
 
)
Switches to another input stream.
adBreak 
 object (  
 AdBreakTask 
 
)
Inserts a new ad opportunity.
returnToProgram 
 object (  
 ReturnToProgramTask 
 
)
Stops any running ad break.
slate 
 object (  
 SlateTask 
 
)
Inserts a slate.
mute 
 object (  
 MuteTask 
 
)
Mutes the stream.
unmute 
 object (  
 UnmuteTask 
 
)
Unmutes the stream.
updateEncryptions 
 object (  
 UpdateEncryptionsTask 
 
)
Updates encryption settings.
InputSwitchTask
Switches to another input stream. Automatic failover is then disabled.
| JSON representation | 
|---|
| { "inputKey" : string } | 
| Fields | |
|---|---|
| inputKey |   The  | 
AdBreakTask
Inserts a new ad opportunity.
| JSON representation | 
|---|
| { "duration" : string } | 
| Fields | |
|---|---|
| duration |   Duration of an ad opportunity. Must be greater than 0. A duration in seconds with up to nine fractional digits, ending with '  | 
ReturnToProgramTask
This type has no fields.
Stops any events which are currently running. This only applies to events with a duration.
SlateTask
Inserts a slate.
| JSON representation | 
|---|
| { "duration" : string , "asset" : string } | 
| Fields | |
|---|---|
| duration |   Optional. Duration of the slate. Must be greater than 0 if specified. Omit this field for a long running slate. A duration in seconds with up to nine fractional digits, ending with '  | 
| asset |   Slate asset to use for the duration. If its duration is less than the duration of the SlateTask, then the slate loops. The slate must be represented in the form of:  | 
MuteTask
Mutes the stream.
| JSON representation | 
|---|
| { "duration" : string } | 
| Fields | |
|---|---|
| duration |   Duration for which the stream should be muted. If omitted, the stream will be muted until an UnmuteTask event is sent. A duration in seconds with up to nine fractional digits, ending with '  | 
UnmuteTask
This type has no fields.
Unmutes the stream. The task fails if the stream is not currently muted.
UpdateEncryptionsTask
Update encryption settings.
| JSON representation | 
|---|
|  { 
 "encryptions" 
 : 
 [ 
 { 
 object (  | 
| Fields | |
|---|---|
| encryptions[] |   Required. A list of  | 
EncryptionUpdate
Encryption setting when updating encryption.
| JSON representation | 
|---|
| { "id" : string , // Union field | 
id 
 string 
Required. Identifier for the encryption option to be updated.
secret_source 
. Defines where new content keys are stored. secret_source 
can be only one of the following:secretManagerKeySource 
 object (  
 SecretManagerSource 
 
)
For keys stored in Google Secret Manager.
State
State of the event
| Enums | |
|---|---|
| STATE_UNSPECIFIED | Event state is not specified. | 
| SCHEDULED | Event is scheduled but not executed yet. | 
| RUNNING | Event is being executed. | 
| SUCCEEDED | Event has been successfully executed. | 
| FAILED | Event fails to be executed. | 
| PENDING | Event has been created but not scheduled yet. | 
| STOPPED | Event was stopped before running for its full duration. | 
| Methods | |
|---|---|
|   | Creates an event with the provided unique ID in the specified channel. | 
|   | Deletes the specified event. | 
|   | Returns the specified event. | 
|   | Returns a list of all events in the specified channel. | 

