diff --git a/packages/google-cloud-video-livestream/README.md b/packages/google-cloud-video-livestream/README.md index da6856f56ce..4b58131a3bb 100644 --- a/packages/google-cloud-video-livestream/README.md +++ b/packages/google-cloud-video-livestream/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Live Stream API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Live Stream API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-livestream) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/livestream.svg)](https://www.npmjs.org/package/@google-cloud/livestream) @@ -114,28 +114,33 @@ callListChannels(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-livestream/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Livestream_service.create_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_channel.js,samples/README.md) | -| Livestream_service.create_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_event.js,samples/README.md) | -| Livestream_service.create_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_input.js,samples/README.md) | -| Livestream_service.delete_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_channel.js,samples/README.md) | -| Livestream_service.delete_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_event.js,samples/README.md) | -| Livestream_service.delete_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_input.js,samples/README.md) | -| Livestream_service.get_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_channel.js,samples/README.md) | -| Livestream_service.get_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_event.js,samples/README.md) | -| Livestream_service.get_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_input.js,samples/README.md) | -| Livestream_service.list_channels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_channels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_channels.js,samples/README.md) | -| Livestream_service.list_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_events.js,samples/README.md) | -| Livestream_service.list_inputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_inputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_inputs.js,samples/README.md) | -| Livestream_service.start_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.start_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.start_channel.js,samples/README.md) | -| Livestream_service.stop_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.stop_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.stop_channel.js,samples/README.md) | -| Livestream_service.update_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_channel.js,samples/README.md) | -| Livestream_service.update_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_input.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/test/quickstart.js,samples/README.md) | +| Livestream_service.create_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.create_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.create_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_event.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.create_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_input.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.delete_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.delete_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.delete_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_event.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.delete_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_input.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.get_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.get_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.get_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_event.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.get_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_input.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.get_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.list_assets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.list_channels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_channels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_channels.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.list_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_events.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.list_inputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_inputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_inputs.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.start_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.start_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.start_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.stop_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.stop_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.stop_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.update_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_channel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_channel.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.update_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_input.js,packages/google-cloud-video-livestream/samples/README.md) | +| Livestream_service.update_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js,packages/google-cloud-video-livestream/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/quickstart.js,packages/google-cloud-video-livestream/samples/README.md) | diff --git a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/outputs.proto b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/outputs.proto index 2eceb825ef6..21a9e9bdcae 100644 --- a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/outputs.proto +++ b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/outputs.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/resources.proto b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/resources.proto index 1691139e2c4..019e345303a 100644 --- a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/resources.proto +++ b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -407,6 +407,21 @@ message Event { google.protobuf.Duration duration = 1; } + // Inserts a slate. + message SlateTask { + // Optional. Duration of the slate. Must be greater than 0 if specified. + // Omit this field for a long running slate. + google.protobuf.Duration duration = 1; + + // Slate asset to use for the duration. If its duration is less than the + // duration of the SlateTask, then it will be looped. The slate must be + // represented in the form of: + // `projects/{project}/locations/{location}/assets/{assetId}`. + string asset = 2 [(google.api.resource_reference) = { + type: "livestream.googleapis.com/Asset" + }]; + } + // Stops any events which are currently running. This only applies to events // with a duration. message ReturnToProgramTask {} @@ -463,21 +478,23 @@ message Event { // Required. Operation to be executed by this event. oneof task { - // Required. Switches to another input stream. - InputSwitchTask input_switch = 5 [(google.api.field_behavior) = REQUIRED]; + // Switches to another input stream. + InputSwitchTask input_switch = 5; - // Required. Inserts a new ad opportunity. - AdBreakTask ad_break = 6 [(google.api.field_behavior) = REQUIRED]; + // Inserts a new ad opportunity. + AdBreakTask ad_break = 6; - // Required. Stops any running ad break. - ReturnToProgramTask return_to_program = 13 - [(google.api.field_behavior) = REQUIRED]; + // Stops any running ad break. + ReturnToProgramTask return_to_program = 13; - // Required. Mutes the stream. - MuteTask mute = 15 [(google.api.field_behavior) = REQUIRED]; + // Inserts a slate. + SlateTask slate = 14; - // Required. Unmutes the stream. - UnmuteTask unmute = 16 [(google.api.field_behavior) = REQUIRED]; + // Mutes the stream. + MuteTask mute = 15; + + // Unmutes the stream. + UnmuteTask unmute = 16; } // When this field is set to true, the event will be executed at the earliest @@ -504,6 +521,89 @@ message Event { google.rpc.Status error = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// An asset represents a video or an image. +message Asset { + option (google.api.resource) = { + type: "livestream.googleapis.com/Asset" + pattern: "projects/{project}/locations/{location}/assets/{asset}" + }; + + // 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. + message VideoAsset { + // Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + string uri = 1; + } + + // Image represents an image. The supported format is JPEG. + message ImageAsset { + // Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + string uri = 1; + } + + // State of the asset resource. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The asset is being created. + CREATING = 1; + + // The asset is ready for use. + ACTIVE = 2; + + // The asset is being deleted. + DELETING = 3; + + // The asset has an error. + ERROR = 4; + } + + // The resource name of the asset, in the form of: + // `projects/{project}/locations/{location}/assets/{assetId}`. + string name = 1; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update time. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined key/value metadata. + map labels = 4; + + // The reference to the asset. + // The maximum size of the resource is 250 MB. + oneof resource { + // VideoAsset represents a video. + VideoAsset video = 5; + + // ImageAsset represents an image. + ImageAsset image = 6; + } + + // 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] 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]. + string crc32c = 7; + + // Output only. The state of the asset resource. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only present when `state` is `ERROR`. The reason for the error + // state of the asset. + google.rpc.Status error = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Encryption settings. message Encryption { // Configuration for secrets stored in Google Secret Manager. @@ -584,3 +684,46 @@ message Encryption { MpegCommonEncryption mpeg_cenc = 6; } } + +// Pool resource defines the configuration of Live Stream pools for a specific +// location. Currently we support only one pool resource per project per +// location. After the creation of the first input, a default pool is created +// automatically at "projects/{project}/locations/{location}/pools/default". +message Pool { + option (google.api.resource) = { + type: "livestream.googleapis.com/Pool" + pattern: "projects/{project}/locations/{location}/pools/{pool}" + }; + + // Defines the network configuration for the pool. + message NetworkConfig { + // peered_network is the network resource URL of the network that is peered + // to the service provider network. Must be of the format + // projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + // NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + // holds your VPC network and NETWORK_NAME is the name of your VPC network. + // If peered_network is omitted or empty, the pool will use endpoints that + // are publicly available. + string peered_network = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Network" + }]; + } + + // The resource name of the pool, in the form of: + // `projects/{project}/locations/{location}/pools/{poolId}`. + string name = 1; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update time. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined key/value metadata. + map labels = 4; + + // Network configuration for the pool. + NetworkConfig network_config = 5; +} diff --git a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/service.proto b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/service.proto index e424e54a4af..49c590c38f0 100644 --- a/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/service.proto +++ b/packages/google-cloud-video-livestream/protos/google/cloud/video/livestream/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,6 +37,10 @@ option (google.api.resource_definition) = { type: "secretmanager.googleapis.com/SecretVersion" pattern: "projects/{project}/secrets/{secret}/versions/{version}" }; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; // Using Live Stream API, you can generate live streams in the various // renditions and streaming formats. The streaming format include HTTP Live @@ -220,6 +224,180 @@ service LivestreamService { }; option (google.api.method_signature) = "name"; } + + // Creates a Asset with the provided unique ID in the specified + // region. + rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/assets" + body: "asset" + }; + option (google.api.method_signature) = "parent,asset,asset_id"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Deletes the specified asset if it is not used. + rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns the specified asset. + rpc GetAsset(GetAssetRequest) returns (Asset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of all assets in the specified region. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified pool. + rpc GetPool(GetPoolRequest) returns (Pool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/pools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified pool. + rpc UpdatePool(UpdatePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{pool.name=projects/*/locations/*/pools/*}" + body: "pool" + }; + option (google.api.method_signature) = "pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Pool" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for "LivestreamService.CreateAsset". +message CreateAssetRequest { + // Required. The parent location for the resource, in the form of: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "livestream.googleapis.com/Asset" + } + ]; + + // Required. The asset resource to be created. + Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the asset resource to be created. + // This value must be 1-63 characters, begin and end with `[a-z0-9]`, + // could contain dashes (-) in between. + string asset_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported `(00000000-0000-0000-0000-000000000000)`. + string request_id = 4; +} + +// Request message for "LivestreamService.DeleteAsset". +message DeleteAssetRequest { + // Required. The name of the asset resource, in the form of: + // `projects/{project}/locations/{location}/assets/{assetId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "livestream.googleapis.com/Asset" + } + ]; + + // A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported `(00000000-0000-0000-0000-000000000000)`. + string request_id = 2; +} + +// Request message for "LivestreamService.ListAssets". +message ListAssetsRequest { + // Required. The parent location for the resource, in the form of: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "livestream.googleapis.com/Asset" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Response message for "LivestreamService.ListAssets". +message ListAssetsResponse { + // The list of Assets + repeated Asset assets = 1; + + // The next_page_token value returned from a previous List request, if any. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for "LivestreamService.GetAsset". +message GetAssetRequest { + // Required. Name of the resource, in the following form: + // `projects/{project}/locations/{location}/assets/{asset}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "livestream.googleapis.com/Asset" + } + ]; } // Request message for "LivestreamService.CreateChannel". @@ -737,3 +915,43 @@ message OperationMetadata { // Output only. API version used to start the operation. string api_version = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Request message for "LivestreamService.GetPool". +message GetPoolRequest { + // Required. The name of the pool resource, in the form of: + // `projects/{project}/locations/{location}/pools/{poolId}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "livestream.googleapis.com/Pool" } + ]; +} + +// Request message for "LivestreamService.UpdatePool". +message UpdatePoolRequest { + // Field mask is used to specify the fields to be overwritten in the Pool + // resource by the update. You can only update the following fields: + // + // * `networkConfig` + // + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. + google.protobuf.FieldMask update_mask = 1; + + // Required. The pool resource to be updated. + Pool pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported `(00000000-0000-0000-0000-000000000000)`. + string request_id = 3; +} diff --git a/packages/google-cloud-video-livestream/protos/protos.d.ts b/packages/google-cloud-video-livestream/protos/protos.d.ts index 21815a78a2d..708eaf9992a 100644 --- a/packages/google-cloud-video-livestream/protos/protos.d.ts +++ b/packages/google-cloud-video-livestream/protos/protos.d.ts @@ -3403,6 +3403,9 @@ export namespace google { /** Event returnToProgram */ returnToProgram?: (google.cloud.video.livestream.v1.Event.IReturnToProgramTask|null); + /** Event slate */ + slate?: (google.cloud.video.livestream.v1.Event.ISlateTask|null); + /** Event mute */ mute?: (google.cloud.video.livestream.v1.Event.IMuteTask|null); @@ -3452,6 +3455,9 @@ export namespace google { /** Event returnToProgram. */ public returnToProgram?: (google.cloud.video.livestream.v1.Event.IReturnToProgramTask|null); + /** Event slate. */ + public slate?: (google.cloud.video.livestream.v1.Event.ISlateTask|null); + /** Event mute. */ public mute?: (google.cloud.video.livestream.v1.Event.IMuteTask|null); @@ -3471,7 +3477,7 @@ export namespace google { public error?: (google.rpc.IStatus|null); /** Event task. */ - public task?: ("inputSwitch"|"adBreak"|"returnToProgram"|"mute"|"unmute"); + public task?: ("inputSwitch"|"adBreak"|"returnToProgram"|"slate"|"mute"|"unmute"); /** * Creates a new Event instance using the specified properties. @@ -3747,6 +3753,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SlateTask. */ + interface ISlateTask { + + /** SlateTask duration */ + duration?: (google.protobuf.IDuration|null); + + /** SlateTask asset */ + asset?: (string|null); + } + + /** Represents a SlateTask. */ + class SlateTask implements ISlateTask { + + /** + * Constructs a new SlateTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.Event.ISlateTask); + + /** SlateTask duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** SlateTask asset. */ + public asset: string; + + /** + * Creates a new SlateTask instance using the specified properties. + * @param [properties] Properties to set + * @returns SlateTask instance + */ + public static create(properties?: google.cloud.video.livestream.v1.Event.ISlateTask): google.cloud.video.livestream.v1.Event.SlateTask; + + /** + * Encodes the specified SlateTask message. Does not implicitly {@link google.cloud.video.livestream.v1.Event.SlateTask.verify|verify} messages. + * @param message SlateTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.Event.ISlateTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SlateTask message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Event.SlateTask.verify|verify} messages. + * @param message SlateTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.Event.ISlateTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SlateTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SlateTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Event.SlateTask; + + /** + * Decodes a SlateTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SlateTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Event.SlateTask; + + /** + * Verifies a SlateTask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SlateTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SlateTask + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Event.SlateTask; + + /** + * Creates a plain object from a SlateTask message. Also converts values to other types if specified. + * @param message SlateTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Event.SlateTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SlateTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SlateTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ReturnToProgramTask. */ interface IReturnToProgramTask { } @@ -4038,513 +4147,867 @@ export namespace google { } } - /** Properties of an Encryption. */ - interface IEncryption { + /** Properties of an Asset. */ + interface IAsset { - /** Encryption id */ - id?: (string|null); + /** Asset name */ + name?: (string|null); - /** Encryption secretManagerKeySource */ - secretManagerKeySource?: (google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null); + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Encryption drmSystems */ - drmSystems?: (google.cloud.video.livestream.v1.Encryption.IDrmSystems|null); + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Encryption aes128 */ - aes128?: (google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null); + /** Asset labels */ + labels?: ({ [k: string]: string }|null); - /** Encryption sampleAes */ - sampleAes?: (google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null); + /** Asset video */ + video?: (google.cloud.video.livestream.v1.Asset.IVideoAsset|null); - /** Encryption mpegCenc */ - mpegCenc?: (google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null); + /** Asset image */ + image?: (google.cloud.video.livestream.v1.Asset.IImageAsset|null); + + /** Asset crc32c */ + crc32c?: (string|null); + + /** Asset state */ + state?: (google.cloud.video.livestream.v1.Asset.State|keyof typeof google.cloud.video.livestream.v1.Asset.State|null); + + /** Asset error */ + error?: (google.rpc.IStatus|null); } - /** Represents an Encryption. */ - class Encryption implements IEncryption { + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Constructs a new Encryption. + * Constructs a new Asset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.video.livestream.v1.IEncryption); + constructor(properties?: google.cloud.video.livestream.v1.IAsset); - /** Encryption id. */ - public id: string; + /** Asset name. */ + public name: string; - /** Encryption secretManagerKeySource. */ - public secretManagerKeySource?: (google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null); + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Encryption drmSystems. */ - public drmSystems?: (google.cloud.video.livestream.v1.Encryption.IDrmSystems|null); + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Encryption aes128. */ - public aes128?: (google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null); + /** Asset labels. */ + public labels: { [k: string]: string }; - /** Encryption sampleAes. */ - public sampleAes?: (google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null); + /** Asset video. */ + public video?: (google.cloud.video.livestream.v1.Asset.IVideoAsset|null); - /** Encryption mpegCenc. */ - public mpegCenc?: (google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null); + /** Asset image. */ + public image?: (google.cloud.video.livestream.v1.Asset.IImageAsset|null); - /** Encryption secretSource. */ - public secretSource?: "secretManagerKeySource"; + /** Asset crc32c. */ + public crc32c: string; - /** Encryption encryptionMode. */ - public encryptionMode?: ("aes128"|"sampleAes"|"mpegCenc"); + /** Asset state. */ + public state: (google.cloud.video.livestream.v1.Asset.State|keyof typeof google.cloud.video.livestream.v1.Asset.State); + + /** Asset error. */ + public error?: (google.rpc.IStatus|null); + + /** Asset resource. */ + public resource?: ("video"|"image"); /** - * Creates a new Encryption instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @param [properties] Properties to set - * @returns Encryption instance + * @returns Asset instance */ - public static create(properties?: google.cloud.video.livestream.v1.IEncryption): google.cloud.video.livestream.v1.Encryption; + public static create(properties?: google.cloud.video.livestream.v1.IAsset): google.cloud.video.livestream.v1.Asset; /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.video.livestream.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.video.livestream.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.video.livestream.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.video.livestream.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Encryption message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Encryption + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Asset; /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Encryption + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Asset; /** - * Verifies an Encryption message. + * Verifies an Asset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Encryption + * @returns Asset */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Asset; /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. - * @param message Encryption + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.video.livestream.v1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.video.livestream.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Encryption to JSON. + * Converts this Asset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Encryption + * Gets the default type url for Asset * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Encryption { + namespace Asset { - /** Properties of a SecretManagerSource. */ - interface ISecretManagerSource { + /** Properties of a VideoAsset. */ + interface IVideoAsset { - /** SecretManagerSource secretVersion */ - secretVersion?: (string|null); + /** VideoAsset uri */ + uri?: (string|null); } - /** Represents a SecretManagerSource. */ - class SecretManagerSource implements ISecretManagerSource { + /** Represents a VideoAsset. */ + class VideoAsset implements IVideoAsset { /** - * Constructs a new SecretManagerSource. + * Constructs a new VideoAsset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource); + constructor(properties?: google.cloud.video.livestream.v1.Asset.IVideoAsset); - /** SecretManagerSource secretVersion. */ - public secretVersion: string; + /** VideoAsset uri. */ + public uri: string; /** - * Creates a new SecretManagerSource instance using the specified properties. + * Creates a new VideoAsset instance using the specified properties. * @param [properties] Properties to set - * @returns SecretManagerSource instance + * @returns VideoAsset instance */ - public static create(properties?: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; + public static create(properties?: google.cloud.video.livestream.v1.Asset.IVideoAsset): google.cloud.video.livestream.v1.Asset.VideoAsset; /** - * Encodes the specified SecretManagerSource message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. - * @param message SecretManagerSource message or plain object to encode + * Encodes the specified VideoAsset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.VideoAsset.verify|verify} messages. + * @param message VideoAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.video.livestream.v1.Asset.IVideoAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecretManagerSource message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. - * @param message SecretManagerSource message or plain object to encode + * Encodes the specified VideoAsset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.VideoAsset.verify|verify} messages. + * @param message VideoAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.video.livestream.v1.Asset.IVideoAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecretManagerSource message from the specified reader or buffer. + * Decodes a VideoAsset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecretManagerSource + * @returns VideoAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Asset.VideoAsset; /** - * Decodes a SecretManagerSource message from the specified reader or buffer, length delimited. + * Decodes a VideoAsset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecretManagerSource + * @returns VideoAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Asset.VideoAsset; /** - * Verifies a SecretManagerSource message. + * Verifies a VideoAsset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecretManagerSource message from a plain object. Also converts values to their respective internal types. + * Creates a VideoAsset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecretManagerSource + * @returns VideoAsset */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Asset.VideoAsset; /** - * Creates a plain object from a SecretManagerSource message. Also converts values to other types if specified. - * @param message SecretManagerSource + * Creates a plain object from a VideoAsset message. Also converts values to other types if specified. + * @param message VideoAsset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.video.livestream.v1.Encryption.SecretManagerSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.video.livestream.v1.Asset.VideoAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecretManagerSource to JSON. + * Converts this VideoAsset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecretManagerSource + * Gets the default type url for VideoAsset * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Widevine. */ - interface IWidevine { + /** Properties of an ImageAsset. */ + interface IImageAsset { + + /** ImageAsset uri */ + uri?: (string|null); } - /** Represents a Widevine. */ - class Widevine implements IWidevine { + /** Represents an ImageAsset. */ + class ImageAsset implements IImageAsset { /** - * Constructs a new Widevine. + * Constructs a new ImageAsset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.video.livestream.v1.Encryption.IWidevine); + constructor(properties?: google.cloud.video.livestream.v1.Asset.IImageAsset); + + /** ImageAsset uri. */ + public uri: string; /** - * Creates a new Widevine instance using the specified properties. + * Creates a new ImageAsset instance using the specified properties. * @param [properties] Properties to set - * @returns Widevine instance + * @returns ImageAsset instance */ - public static create(properties?: google.cloud.video.livestream.v1.Encryption.IWidevine): google.cloud.video.livestream.v1.Encryption.Widevine; + public static create(properties?: google.cloud.video.livestream.v1.Asset.IImageAsset): google.cloud.video.livestream.v1.Asset.ImageAsset; /** - * Encodes the specified Widevine message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. - * @param message Widevine message or plain object to encode + * Encodes the specified ImageAsset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.ImageAsset.verify|verify} messages. + * @param message ImageAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.video.livestream.v1.Encryption.IWidevine, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.video.livestream.v1.Asset.IImageAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Widevine message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. - * @param message Widevine message or plain object to encode + * Encodes the specified ImageAsset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.ImageAsset.verify|verify} messages. + * @param message ImageAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IWidevine, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.video.livestream.v1.Asset.IImageAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Widevine message from the specified reader or buffer. + * Decodes an ImageAsset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Widevine + * @returns ImageAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Widevine; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Asset.ImageAsset; /** - * Decodes a Widevine message from the specified reader or buffer, length delimited. + * Decodes an ImageAsset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Widevine + * @returns ImageAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Widevine; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Asset.ImageAsset; /** - * Verifies a Widevine message. + * Verifies an ImageAsset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Widevine message from a plain object. Also converts values to their respective internal types. + * Creates an ImageAsset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Widevine + * @returns ImageAsset */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Widevine; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Asset.ImageAsset; /** - * Creates a plain object from a Widevine message. Also converts values to other types if specified. - * @param message Widevine + * Creates a plain object from an ImageAsset message. Also converts values to other types if specified. + * @param message ImageAsset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.video.livestream.v1.Encryption.Widevine, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.video.livestream.v1.Asset.ImageAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Widevine to JSON. + * Converts this ImageAsset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Widevine + * Gets the default type url for ImageAsset * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Fairplay. */ - interface IFairplay { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 } + } - /** Represents a Fairplay. */ - class Fairplay implements IFairplay { + /** Properties of an Encryption. */ + interface IEncryption { - /** - * Constructs a new Fairplay. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.livestream.v1.Encryption.IFairplay); + /** Encryption id */ + id?: (string|null); - /** - * Creates a new Fairplay instance using the specified properties. - * @param [properties] Properties to set - * @returns Fairplay instance - */ - public static create(properties?: google.cloud.video.livestream.v1.Encryption.IFairplay): google.cloud.video.livestream.v1.Encryption.Fairplay; + /** Encryption secretManagerKeySource */ + secretManagerKeySource?: (google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null); - /** - * Encodes the specified Fairplay message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. - * @param message Fairplay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.livestream.v1.Encryption.IFairplay, writer?: $protobuf.Writer): $protobuf.Writer; + /** Encryption drmSystems */ + drmSystems?: (google.cloud.video.livestream.v1.Encryption.IDrmSystems|null); - /** - * Encodes the specified Fairplay message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. - * @param message Fairplay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IFairplay, writer?: $protobuf.Writer): $protobuf.Writer; + /** Encryption aes128 */ + aes128?: (google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes */ + sampleAes?: (google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc */ + mpegCenc?: (google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null); + } + + /** Represents an Encryption. */ + class Encryption implements IEncryption { + + /** + * Constructs a new Encryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IEncryption); + + /** Encryption id. */ + public id: string; + + /** Encryption secretManagerKeySource. */ + public secretManagerKeySource?: (google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null); + + /** Encryption drmSystems. */ + public drmSystems?: (google.cloud.video.livestream.v1.Encryption.IDrmSystems|null); + + /** Encryption aes128. */ + public aes128?: (google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes. */ + public sampleAes?: (google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc. */ + public mpegCenc?: (google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null); + + /** Encryption secretSource. */ + public secretSource?: "secretManagerKeySource"; + + /** Encryption encryptionMode. */ + public encryptionMode?: ("aes128"|"sampleAes"|"mpegCenc"); + + /** + * Creates a new Encryption instance using the specified properties. + * @param [properties] Properties to set + * @returns Encryption instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IEncryption): google.cloud.video.livestream.v1.Encryption; + + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption; + + /** + * Verifies an Encryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @param message Encryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encryption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encryption { + + /** Properties of a SecretManagerSource. */ + interface ISecretManagerSource { + + /** SecretManagerSource secretVersion */ + secretVersion?: (string|null); + } + + /** Represents a SecretManagerSource. */ + class SecretManagerSource implements ISecretManagerSource { /** - * Decodes a Fairplay message from the specified reader or buffer. + * Constructs a new SecretManagerSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource); + + /** SecretManagerSource secretVersion. */ + public secretVersion: string; + + /** + * Creates a new SecretManagerSource instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerSource instance + */ + public static create(properties?: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; + + /** + * Encodes the specified SecretManagerSource message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * @param message SecretManagerSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerSource message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * @param message SecretManagerSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.ISecretManagerSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Fairplay + * @returns SecretManagerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Fairplay; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; /** - * Decodes a Fairplay message from the specified reader or buffer, length delimited. + * Decodes a SecretManagerSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fairplay + * @returns SecretManagerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Fairplay; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; /** - * Verifies a Fairplay message. + * Verifies a SecretManagerSource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Fairplay message from a plain object. Also converts values to their respective internal types. + * Creates a SecretManagerSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fairplay + * @returns SecretManagerSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Fairplay; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.SecretManagerSource; /** - * Creates a plain object from a Fairplay message. Also converts values to other types if specified. - * @param message Fairplay + * Creates a plain object from a SecretManagerSource message. Also converts values to other types if specified. + * @param message SecretManagerSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.video.livestream.v1.Encryption.Fairplay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.video.livestream.v1.Encryption.SecretManagerSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fairplay to JSON. + * Converts this SecretManagerSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Fairplay + * Gets the default type url for SecretManagerSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Playready. */ - interface IPlayready { + /** Properties of a Widevine. */ + interface IWidevine { } - /** Represents a Playready. */ - class Playready implements IPlayready { + /** Represents a Widevine. */ + class Widevine implements IWidevine { /** - * Constructs a new Playready. + * Constructs a new Widevine. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.video.livestream.v1.Encryption.IPlayready); + constructor(properties?: google.cloud.video.livestream.v1.Encryption.IWidevine); /** - * Creates a new Playready instance using the specified properties. + * Creates a new Widevine instance using the specified properties. * @param [properties] Properties to set - * @returns Playready instance + * @returns Widevine instance */ - public static create(properties?: google.cloud.video.livestream.v1.Encryption.IPlayready): google.cloud.video.livestream.v1.Encryption.Playready; + public static create(properties?: google.cloud.video.livestream.v1.Encryption.IWidevine): google.cloud.video.livestream.v1.Encryption.Widevine; /** - * Encodes the specified Playready message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. - * @param message Playready message or plain object to encode + * Encodes the specified Widevine message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * @param message Widevine message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.video.livestream.v1.Encryption.IPlayready, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.video.livestream.v1.Encryption.IWidevine, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Playready message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. - * @param message Playready message or plain object to encode + * Encodes the specified Widevine message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * @param message Widevine message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IPlayready, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IWidevine, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Playready message from the specified reader or buffer. + * Decodes a Widevine message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Playready + * @returns Widevine * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Playready; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Widevine; /** - * Decodes a Playready message from the specified reader or buffer, length delimited. + * Decodes a Widevine message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Playready + * @returns Widevine * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Playready; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Widevine; /** - * Verifies a Playready message. + * Verifies a Widevine message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Playready message from a plain object. Also converts values to their respective internal types. + * Creates a Widevine message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Playready + * @returns Widevine */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Playready; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Widevine; /** - * Creates a plain object from a Playready message. Also converts values to other types if specified. - * @param message Playready + * Creates a plain object from a Widevine message. Also converts values to other types if specified. + * @param message Widevine * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.video.livestream.v1.Encryption.Playready, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.video.livestream.v1.Encryption.Widevine, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Playready to JSON. + * Converts this Widevine to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Playready + * Gets the default type url for Widevine * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Clearkey. */ - interface IClearkey { + /** Properties of a Fairplay. */ + interface IFairplay { + } + + /** Represents a Fairplay. */ + class Fairplay implements IFairplay { + + /** + * Constructs a new Fairplay. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.Encryption.IFairplay); + + /** + * Creates a new Fairplay instance using the specified properties. + * @param [properties] Properties to set + * @returns Fairplay instance + */ + public static create(properties?: google.cloud.video.livestream.v1.Encryption.IFairplay): google.cloud.video.livestream.v1.Encryption.Fairplay; + + /** + * Encodes the specified Fairplay message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. + * @param message Fairplay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.Encryption.IFairplay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fairplay message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. + * @param message Fairplay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IFairplay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fairplay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Fairplay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Fairplay; + + /** + * Decodes a Fairplay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Fairplay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Fairplay; + + /** + * Verifies a Fairplay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Fairplay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fairplay + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Fairplay; + + /** + * Creates a plain object from a Fairplay message. Also converts values to other types if specified. + * @param message Fairplay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Encryption.Fairplay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fairplay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Fairplay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Playready. */ + interface IPlayready { + } + + /** Represents a Playready. */ + class Playready implements IPlayready { + + /** + * Constructs a new Playready. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.Encryption.IPlayready); + + /** + * Creates a new Playready instance using the specified properties. + * @param [properties] Properties to set + * @returns Playready instance + */ + public static create(properties?: google.cloud.video.livestream.v1.Encryption.IPlayready): google.cloud.video.livestream.v1.Encryption.Playready; + + /** + * Encodes the specified Playready message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. + * @param message Playready message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.Encryption.IPlayready, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Playready message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. + * @param message Playready message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.Encryption.IPlayready, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Playready message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Playready + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Encryption.Playready; + + /** + * Decodes a Playready message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Playready + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Encryption.Playready; + + /** + * Verifies a Playready message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Playready message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Playready + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Encryption.Playready; + + /** + * Creates a plain object from a Playready message. Also converts values to other types if specified. + * @param message Playready + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Encryption.Playready, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Playready to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Playready + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Clearkey. */ + interface IClearkey { } /** Represents a Clearkey. */ @@ -5029,67 +5492,288 @@ export namespace google { } } - /** Represents a LivestreamService */ - class LivestreamService extends $protobuf.rpc.Service { + /** Properties of a Pool. */ + interface IPool { + + /** Pool name */ + name?: (string|null); + + /** Pool createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Pool updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Pool labels */ + labels?: ({ [k: string]: string }|null); + + /** Pool networkConfig */ + networkConfig?: (google.cloud.video.livestream.v1.Pool.INetworkConfig|null); + } + + /** Represents a Pool. */ + class Pool implements IPool { /** - * Constructs a new LivestreamService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new Pool. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.video.livestream.v1.IPool); + + /** Pool name. */ + public name: string; + + /** Pool createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Pool updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Pool labels. */ + public labels: { [k: string]: string }; + + /** Pool networkConfig. */ + public networkConfig?: (google.cloud.video.livestream.v1.Pool.INetworkConfig|null); /** - * Creates new LivestreamService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new Pool instance using the specified properties. + * @param [properties] Properties to set + * @returns Pool instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LivestreamService; + public static create(properties?: google.cloud.video.livestream.v1.IPool): google.cloud.video.livestream.v1.Pool; /** - * Calls CreateChannel. - * @param request CreateChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified Pool message. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.verify|verify} messages. + * @param message Pool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createChannel(request: google.cloud.video.livestream.v1.ICreateChannelRequest, callback: google.cloud.video.livestream.v1.LivestreamService.CreateChannelCallback): void; + public static encode(message: google.cloud.video.livestream.v1.IPool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateChannel. - * @param request CreateChannelRequest message or plain object - * @returns Promise + * Encodes the specified Pool message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.verify|verify} messages. + * @param message Pool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createChannel(request: google.cloud.video.livestream.v1.ICreateChannelRequest): Promise; + public static encodeDelimited(message: google.cloud.video.livestream.v1.IPool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListChannels. - * @param request ListChannelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListChannelsResponse + * Decodes a Pool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listChannels(request: google.cloud.video.livestream.v1.IListChannelsRequest, callback: google.cloud.video.livestream.v1.LivestreamService.ListChannelsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Pool; /** - * Calls ListChannels. - * @param request ListChannelsRequest message or plain object - * @returns Promise + * Decodes a Pool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listChannels(request: google.cloud.video.livestream.v1.IListChannelsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Pool; /** - * Calls GetChannel. - * @param request GetChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Channel + * Verifies a Pool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getChannel(request: google.cloud.video.livestream.v1.IGetChannelRequest, callback: google.cloud.video.livestream.v1.LivestreamService.GetChannelCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetChannel. - * @param request GetChannelRequest message or plain object - * @returns Promise + * Creates a Pool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pool */ - public getChannel(request: google.cloud.video.livestream.v1.IGetChannelRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Pool; + + /** + * Creates a plain object from a Pool message. Also converts values to other types if specified. + * @param message Pool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Pool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Pool { + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig peeredNetwork */ + peeredNetwork?: (string|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.Pool.INetworkConfig); + + /** NetworkConfig peeredNetwork. */ + public peeredNetwork: string; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.video.livestream.v1.Pool.INetworkConfig): google.cloud.video.livestream.v1.Pool.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.Pool.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.Pool.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.Pool.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.Pool.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.Pool.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.Pool.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a LivestreamService */ + class LivestreamService extends $protobuf.rpc.Service { + + /** + * Constructs a new LivestreamService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new LivestreamService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LivestreamService; + + /** + * Calls CreateChannel. + * @param request CreateChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createChannel(request: google.cloud.video.livestream.v1.ICreateChannelRequest, callback: google.cloud.video.livestream.v1.LivestreamService.CreateChannelCallback): void; + + /** + * Calls CreateChannel. + * @param request CreateChannelRequest message or plain object + * @returns Promise + */ + public createChannel(request: google.cloud.video.livestream.v1.ICreateChannelRequest): Promise; + + /** + * Calls ListChannels. + * @param request ListChannelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListChannelsResponse + */ + public listChannels(request: google.cloud.video.livestream.v1.IListChannelsRequest, callback: google.cloud.video.livestream.v1.LivestreamService.ListChannelsCallback): void; + + /** + * Calls ListChannels. + * @param request ListChannelsRequest message or plain object + * @returns Promise + */ + public listChannels(request: google.cloud.video.livestream.v1.IListChannelsRequest): Promise; + + /** + * Calls GetChannel. + * @param request GetChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Channel + */ + public getChannel(request: google.cloud.video.livestream.v1.IGetChannelRequest, callback: google.cloud.video.livestream.v1.LivestreamService.GetChannelCallback): void; + + /** + * Calls GetChannel. + * @param request GetChannelRequest message or plain object + * @returns Promise + */ + public getChannel(request: google.cloud.video.livestream.v1.IGetChannelRequest): Promise; /** * Calls DeleteChannel. @@ -5264,129 +5948,800 @@ export namespace google { * @param request DeleteEventRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteEvent(request: google.cloud.video.livestream.v1.IDeleteEventRequest, callback: google.cloud.video.livestream.v1.LivestreamService.DeleteEventCallback): void; + public deleteEvent(request: google.cloud.video.livestream.v1.IDeleteEventRequest, callback: google.cloud.video.livestream.v1.LivestreamService.DeleteEventCallback): void; + + /** + * Calls DeleteEvent. + * @param request DeleteEventRequest message or plain object + * @returns Promise + */ + public deleteEvent(request: google.cloud.video.livestream.v1.IDeleteEventRequest): Promise; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.video.livestream.v1.ICreateAssetRequest, callback: google.cloud.video.livestream.v1.LivestreamService.CreateAssetCallback): void; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.video.livestream.v1.ICreateAssetRequest): Promise; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.video.livestream.v1.IDeleteAssetRequest, callback: google.cloud.video.livestream.v1.LivestreamService.DeleteAssetCallback): void; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.video.livestream.v1.IDeleteAssetRequest): Promise; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.video.livestream.v1.IGetAssetRequest, callback: google.cloud.video.livestream.v1.LivestreamService.GetAssetCallback): void; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.video.livestream.v1.IGetAssetRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.video.livestream.v1.IListAssetsRequest, callback: google.cloud.video.livestream.v1.LivestreamService.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.video.livestream.v1.IListAssetsRequest): Promise; + + /** + * Calls GetPool. + * @param request GetPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Pool + */ + public getPool(request: google.cloud.video.livestream.v1.IGetPoolRequest, callback: google.cloud.video.livestream.v1.LivestreamService.GetPoolCallback): void; + + /** + * Calls GetPool. + * @param request GetPoolRequest message or plain object + * @returns Promise + */ + public getPool(request: google.cloud.video.livestream.v1.IGetPoolRequest): Promise; + + /** + * Calls UpdatePool. + * @param request UpdatePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updatePool(request: google.cloud.video.livestream.v1.IUpdatePoolRequest, callback: google.cloud.video.livestream.v1.LivestreamService.UpdatePoolCallback): void; + + /** + * Calls UpdatePool. + * @param request UpdatePoolRequest message or plain object + * @returns Promise + */ + public updatePool(request: google.cloud.video.livestream.v1.IUpdatePoolRequest): Promise; + } + + namespace LivestreamService { + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listChannels}. + * @param error Error, if any + * @param [response] ListChannelsResponse + */ + type ListChannelsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListChannelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getChannel}. + * @param error Error, if any + * @param [response] Channel + */ + type GetChannelCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Channel) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|startChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type StartChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|stopChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type StopChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createInput}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listInputs}. + * @param error Error, if any + * @param [response] ListInputsResponse + */ + type ListInputsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListInputsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getInput}. + * @param error Error, if any + * @param [response] Input + */ + type GetInputCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Input) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteInput}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateInput}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createEvent}. + * @param error Error, if any + * @param [response] Event + */ + type CreateEventCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Event) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listEvents}. + * @param error Error, if any + * @param [response] ListEventsResponse + */ + type ListEventsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListEventsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getEvent}. + * @param error Error, if any + * @param [response] Event + */ + type GetEventCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Event) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteEvent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEventCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Asset) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListAssetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getPool}. + * @param error Error, if any + * @param [response] Pool + */ + type GetPoolCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Pool) => void; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updatePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdatePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { + + /** CreateAssetRequest parent */ + parent?: (string|null); + + /** CreateAssetRequest asset */ + asset?: (google.cloud.video.livestream.v1.IAsset|null); + + /** CreateAssetRequest assetId */ + assetId?: (string|null); + + /** CreateAssetRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { + + /** + * Constructs a new CreateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.ICreateAssetRequest); + + /** CreateAssetRequest parent. */ + public parent: string; + + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.video.livestream.v1.IAsset|null); + + /** CreateAssetRequest assetId. */ + public assetId: string; + + /** CreateAssetRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAssetRequest instance + */ + public static create(properties?: google.cloud.video.livestream.v1.ICreateAssetRequest): google.cloud.video.livestream.v1.CreateAssetRequest; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.CreateAssetRequest; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.CreateAssetRequest; + + /** + * Verifies a CreateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.CreateAssetRequest; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { + + /** DeleteAssetRequest name */ + name?: (string|null); + + /** DeleteAssetRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { + + /** + * Constructs a new DeleteAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IDeleteAssetRequest); + + /** DeleteAssetRequest name. */ + public name: string; + + /** DeleteAssetRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAssetRequest instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IDeleteAssetRequest): google.cloud.video.livestream.v1.DeleteAssetRequest; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.DeleteAssetRequest; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.DeleteAssetRequest; + + /** + * Verifies a DeleteAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.DeleteAssetRequest; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { + + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { + + /** + * Constructs a new ListAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IListAssetsRequest); + + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsRequest instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IListAssetsRequest): google.cloud.video.livestream.v1.ListAssetsRequest; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.ListAssetsRequest; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.ListAssetsRequest; + + /** + * Verifies a ListAssetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.ListAssetsRequest; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { + + /** ListAssetsResponse assets */ + assets?: (google.cloud.video.livestream.v1.IAsset[]|null); + + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAssetsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { + + /** + * Constructs a new ListAssetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IListAssetsResponse); + + /** ListAssetsResponse assets. */ + public assets: google.cloud.video.livestream.v1.IAsset[]; + + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAssetsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsResponse instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IListAssetsResponse): google.cloud.video.livestream.v1.ListAssetsResponse; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.ListAssetsResponse; /** - * Calls DeleteEvent. - * @param request DeleteEventRequest message or plain object - * @returns Promise + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEvent(request: google.cloud.video.livestream.v1.IDeleteEventRequest): Promise; - } - - namespace LivestreamService { + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.ListAssetsResponse; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createChannel}. - * @param error Error, if any - * @param [response] Operation + * Verifies a ListAssetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listChannels}. - * @param error Error, if any - * @param [response] ListChannelsResponse + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsResponse */ - type ListChannelsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListChannelsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.ListAssetsResponse; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getChannel}. - * @param error Error, if any - * @param [response] Channel + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse + * @param [options] Conversion options + * @returns Plain object */ - type GetChannelCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Channel) => void; + public static toObject(message: google.cloud.video.livestream.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteChannel}. - * @param error Error, if any - * @param [response] Operation + * Converts this ListAssetsResponse to JSON. + * @returns JSON object */ - type DeleteChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateChannel}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for ListAssetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type UpdateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { + + /** GetAssetRequest name */ + name?: (string|null); + } + + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|startChannel}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new GetAssetRequest. + * @param [properties] Properties to set */ - type StartChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(properties?: google.cloud.video.livestream.v1.IGetAssetRequest); + + /** GetAssetRequest name. */ + public name: string; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|stopChannel}. - * @param error Error, if any - * @param [response] Operation + * Creates a new GetAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAssetRequest instance */ - type StopChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static create(properties?: google.cloud.video.livestream.v1.IGetAssetRequest): google.cloud.video.livestream.v1.GetAssetRequest; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createInput}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.video.livestream.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listInputs}. - * @param error Error, if any - * @param [response] ListInputsResponse + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListInputsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListInputsResponse) => void; + public static encodeDelimited(message: google.cloud.video.livestream.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getInput}. - * @param error Error, if any - * @param [response] Input + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetInputCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Input) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.GetAssetRequest; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteInput}. - * @param error Error, if any - * @param [response] Operation + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.GetAssetRequest; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateInput}. - * @param error Error, if any - * @param [response] Operation + * Verifies a GetAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type UpdateInputCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createEvent}. - * @param error Error, if any - * @param [response] Event + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAssetRequest */ - type CreateEventCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Event) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.GetAssetRequest; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listEvents}. - * @param error Error, if any - * @param [response] ListEventsResponse + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListEventsCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.ListEventsResponse) => void; + public static toObject(message: google.cloud.video.livestream.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getEvent}. - * @param error Error, if any - * @param [response] Event + * Converts this GetAssetRequest to JSON. + * @returns JSON object */ - type GetEventCallback = (error: (Error|null), response?: google.cloud.video.livestream.v1.Event) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteEvent}. - * @param error Error, if any - * @param [response] Empty + * Gets the default type url for GetAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type DeleteEventCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateChannelRequest. */ @@ -7671,6 +9026,212 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a GetPoolRequest. */ + interface IGetPoolRequest { + + /** GetPoolRequest name */ + name?: (string|null); + } + + /** Represents a GetPoolRequest. */ + class GetPoolRequest implements IGetPoolRequest { + + /** + * Constructs a new GetPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IGetPoolRequest); + + /** GetPoolRequest name. */ + public name: string; + + /** + * Creates a new GetPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPoolRequest instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IGetPoolRequest): google.cloud.video.livestream.v1.GetPoolRequest; + + /** + * Encodes the specified GetPoolRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetPoolRequest.verify|verify} messages. + * @param message GetPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IGetPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPoolRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetPoolRequest.verify|verify} messages. + * @param message GetPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IGetPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.GetPoolRequest; + + /** + * Decodes a GetPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.GetPoolRequest; + + /** + * Verifies a GetPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.GetPoolRequest; + + /** + * Creates a plain object from a GetPoolRequest message. Also converts values to other types if specified. + * @param message GetPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.GetPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePoolRequest. */ + interface IUpdatePoolRequest { + + /** UpdatePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdatePoolRequest pool */ + pool?: (google.cloud.video.livestream.v1.IPool|null); + + /** UpdatePoolRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdatePoolRequest. */ + class UpdatePoolRequest implements IUpdatePoolRequest { + + /** + * Constructs a new UpdatePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.livestream.v1.IUpdatePoolRequest); + + /** UpdatePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdatePoolRequest pool. */ + public pool?: (google.cloud.video.livestream.v1.IPool|null); + + /** UpdatePoolRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdatePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePoolRequest instance + */ + public static create(properties?: google.cloud.video.livestream.v1.IUpdatePoolRequest): google.cloud.video.livestream.v1.UpdatePoolRequest; + + /** + * Encodes the specified UpdatePoolRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdatePoolRequest.verify|verify} messages. + * @param message UpdatePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.livestream.v1.IUpdatePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePoolRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdatePoolRequest.verify|verify} messages. + * @param message UpdatePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.livestream.v1.IUpdatePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.livestream.v1.UpdatePoolRequest; + + /** + * Decodes an UpdatePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.livestream.v1.UpdatePoolRequest; + + /** + * Verifies an UpdatePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.livestream.v1.UpdatePoolRequest; + + /** + * Creates a plain object from an UpdatePoolRequest message. Also converts values to other types if specified. + * @param message UpdatePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.livestream.v1.UpdatePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } diff --git a/packages/google-cloud-video-livestream/protos/protos.js b/packages/google-cloud-video-livestream/protos/protos.js index dcb01cbdfbf..6f255a73365 100644 --- a/packages/google-cloud-video-livestream/protos/protos.js +++ b/packages/google-cloud-video-livestream/protos/protos.js @@ -8800,6 +8800,7 @@ * @property {google.cloud.video.livestream.v1.Event.IInputSwitchTask|null} [inputSwitch] Event inputSwitch * @property {google.cloud.video.livestream.v1.Event.IAdBreakTask|null} [adBreak] Event adBreak * @property {google.cloud.video.livestream.v1.Event.IReturnToProgramTask|null} [returnToProgram] Event returnToProgram + * @property {google.cloud.video.livestream.v1.Event.ISlateTask|null} [slate] Event slate * @property {google.cloud.video.livestream.v1.Event.IMuteTask|null} [mute] Event mute * @property {google.cloud.video.livestream.v1.Event.IUnmuteTask|null} [unmute] Event unmute * @property {boolean|null} [executeNow] Event executeNow @@ -8880,6 +8881,14 @@ */ Event.prototype.returnToProgram = null; + /** + * Event slate. + * @member {google.cloud.video.livestream.v1.Event.ISlateTask|null|undefined} slate + * @memberof google.cloud.video.livestream.v1.Event + * @instance + */ + Event.prototype.slate = null; + /** * Event mute. * @member {google.cloud.video.livestream.v1.Event.IMuteTask|null|undefined} mute @@ -8933,12 +8942,12 @@ /** * Event task. - * @member {"inputSwitch"|"adBreak"|"returnToProgram"|"mute"|"unmute"|undefined} task + * @member {"inputSwitch"|"adBreak"|"returnToProgram"|"slate"|"mute"|"unmute"|undefined} task * @memberof google.cloud.video.livestream.v1.Event * @instance */ Object.defineProperty(Event.prototype, "task", { - get: $util.oneOfGetter($oneOfFields = ["inputSwitch", "adBreak", "returnToProgram", "mute", "unmute"]), + get: $util.oneOfGetter($oneOfFields = ["inputSwitch", "adBreak", "returnToProgram", "slate", "mute", "unmute"]), set: $util.oneOfSetter($oneOfFields) }); @@ -8989,6 +8998,8 @@ $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.returnToProgram != null && Object.hasOwnProperty.call(message, "returnToProgram")) $root.google.cloud.video.livestream.v1.Event.ReturnToProgramTask.encode(message.returnToProgram, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) + $root.google.cloud.video.livestream.v1.Event.SlateTask.encode(message.slate, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) $root.google.cloud.video.livestream.v1.Event.MuteTask.encode(message.mute, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); if (message.unmute != null && Object.hasOwnProperty.call(message, "unmute")) @@ -9074,6 +9085,10 @@ message.returnToProgram = $root.google.cloud.video.livestream.v1.Event.ReturnToProgramTask.decode(reader, reader.uint32()); break; } + case 14: { + message.slate = $root.google.cloud.video.livestream.v1.Event.SlateTask.decode(reader, reader.uint32()); + break; + } case 15: { message.mute = $root.google.cloud.video.livestream.v1.Event.MuteTask.decode(reader, reader.uint32()); break; @@ -9183,6 +9198,16 @@ return "returnToProgram." + error; } } + if (message.slate != null && message.hasOwnProperty("slate")) { + if (properties.task === 1) + return "task: multiple values"; + properties.task = 1; + { + var error = $root.google.cloud.video.livestream.v1.Event.SlateTask.verify(message.slate); + if (error) + return "slate." + error; + } + } if (message.mute != null && message.hasOwnProperty("mute")) { if (properties.task === 1) return "task: multiple values"; @@ -9278,6 +9303,11 @@ throw TypeError(".google.cloud.video.livestream.v1.Event.returnToProgram: object expected"); message.returnToProgram = $root.google.cloud.video.livestream.v1.Event.ReturnToProgramTask.fromObject(object.returnToProgram); } + if (object.slate != null) { + if (typeof object.slate !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Event.slate: object expected"); + message.slate = $root.google.cloud.video.livestream.v1.Event.SlateTask.fromObject(object.slate); + } if (object.mute != null) { if (typeof object.mute !== "object") throw TypeError(".google.cloud.video.livestream.v1.Event.mute: object expected"); @@ -9398,6 +9428,11 @@ if (options.oneofs) object.task = "returnToProgram"; } + if (message.slate != null && message.hasOwnProperty("slate")) { + object.slate = $root.google.cloud.video.livestream.v1.Event.SlateTask.toObject(message.slate, options); + if (options.oneofs) + object.task = "slate"; + } if (message.mute != null && message.hasOwnProperty("mute")) { object.mute = $root.google.cloud.video.livestream.v1.Event.MuteTask.toObject(message.mute, options); if (options.oneofs) @@ -9848,6 +9883,238 @@ return AdBreakTask; })(); + Event.SlateTask = (function() { + + /** + * Properties of a SlateTask. + * @memberof google.cloud.video.livestream.v1.Event + * @interface ISlateTask + * @property {google.protobuf.IDuration|null} [duration] SlateTask duration + * @property {string|null} [asset] SlateTask asset + */ + + /** + * Constructs a new SlateTask. + * @memberof google.cloud.video.livestream.v1.Event + * @classdesc Represents a SlateTask. + * @implements ISlateTask + * @constructor + * @param {google.cloud.video.livestream.v1.Event.ISlateTask=} [properties] Properties to set + */ + function SlateTask(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SlateTask duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @instance + */ + SlateTask.prototype.duration = null; + + /** + * SlateTask asset. + * @member {string} asset + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @instance + */ + SlateTask.prototype.asset = ""; + + /** + * Creates a new SlateTask instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {google.cloud.video.livestream.v1.Event.ISlateTask=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Event.SlateTask} SlateTask instance + */ + SlateTask.create = function create(properties) { + return new SlateTask(properties); + }; + + /** + * Encodes the specified SlateTask message. Does not implicitly {@link google.cloud.video.livestream.v1.Event.SlateTask.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {google.cloud.video.livestream.v1.Event.ISlateTask} message SlateTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlateTask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.asset); + return writer; + }; + + /** + * Encodes the specified SlateTask message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Event.SlateTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {google.cloud.video.livestream.v1.Event.ISlateTask} message SlateTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SlateTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SlateTask message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Event.SlateTask} SlateTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlateTask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Event.SlateTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.asset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SlateTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Event.SlateTask} SlateTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SlateTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SlateTask message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SlateTask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + return null; + }; + + /** + * Creates a SlateTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Event.SlateTask} SlateTask + */ + SlateTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Event.SlateTask) + return object; + var message = new $root.google.cloud.video.livestream.v1.Event.SlateTask(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Event.SlateTask.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.asset != null) + message.asset = String(object.asset); + return message; + }; + + /** + * Creates a plain object from a SlateTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {google.cloud.video.livestream.v1.Event.SlateTask} message SlateTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SlateTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.duration = null; + object.asset = ""; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + return object; + }; + + /** + * Converts this SlateTask to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @instance + * @returns {Object.} JSON object + */ + SlateTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SlateTask + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Event.SlateTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SlateTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Event.SlateTask"; + }; + + return SlateTask; + })(); + Event.ReturnToProgramTask = (function() { /** @@ -10433,29 +10700,33 @@ return Event; })(); - v1.Encryption = (function() { + v1.Asset = (function() { /** - * Properties of an Encryption. + * Properties of an Asset. * @memberof google.cloud.video.livestream.v1 - * @interface IEncryption - * @property {string|null} [id] Encryption id - * @property {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null} [secretManagerKeySource] Encryption secretManagerKeySource - * @property {google.cloud.video.livestream.v1.Encryption.IDrmSystems|null} [drmSystems] Encryption drmSystems - * @property {google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null} [aes128] Encryption aes128 - * @property {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes - * @property {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {Object.|null} [labels] Asset labels + * @property {google.cloud.video.livestream.v1.Asset.IVideoAsset|null} [video] Asset video + * @property {google.cloud.video.livestream.v1.Asset.IImageAsset|null} [image] Asset image + * @property {string|null} [crc32c] Asset crc32c + * @property {google.cloud.video.livestream.v1.Asset.State|null} [state] Asset state + * @property {google.rpc.IStatus|null} [error] Asset error */ /** - * Constructs a new Encryption. + * Constructs a new Asset. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents an Encryption. - * @implements IEncryption + * @classdesc Represents an Asset. + * @implements IAsset * @constructor - * @param {google.cloud.video.livestream.v1.IEncryption=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IAsset=} [properties] Properties to set */ - function Encryption(properties) { + function Asset(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10463,170 +10734,221 @@ } /** - * Encryption id. - * @member {string} id - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.id = ""; + Asset.prototype.name = ""; /** - * Encryption secretManagerKeySource. - * @member {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null|undefined} secretManagerKeySource - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.secretManagerKeySource = null; + Asset.prototype.createTime = null; /** - * Encryption drmSystems. - * @member {google.cloud.video.livestream.v1.Encryption.IDrmSystems|null|undefined} drmSystems - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.drmSystems = null; + Asset.prototype.updateTime = null; /** - * Encryption aes128. - * @member {google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null|undefined} aes128 - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset labels. + * @member {Object.} labels + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.aes128 = null; + Asset.prototype.labels = $util.emptyObject; /** - * Encryption sampleAes. - * @member {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null|undefined} sampleAes - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset video. + * @member {google.cloud.video.livestream.v1.Asset.IVideoAsset|null|undefined} video + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.sampleAes = null; + Asset.prototype.video = null; /** - * Encryption mpegCenc. - * @member {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset image. + * @member {google.cloud.video.livestream.v1.Asset.IImageAsset|null|undefined} image + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Encryption.prototype.mpegCenc = null; + Asset.prototype.image = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Asset crc32c. + * @member {string} crc32c + * @memberof google.cloud.video.livestream.v1.Asset + * @instance + */ + Asset.prototype.crc32c = ""; /** - * Encryption secretSource. - * @member {"secretManagerKeySource"|undefined} secretSource - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset state. + * @member {google.cloud.video.livestream.v1.Asset.State} state + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Object.defineProperty(Encryption.prototype, "secretSource", { - get: $util.oneOfGetter($oneOfFields = ["secretManagerKeySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + Asset.prototype.state = 0; /** - * Encryption encryptionMode. - * @member {"aes128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode - * @memberof google.cloud.video.livestream.v1.Encryption + * Asset error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.video.livestream.v1.Asset * @instance */ - Object.defineProperty(Encryption.prototype, "encryptionMode", { - get: $util.oneOfGetter($oneOfFields = ["aes128", "sampleAes", "mpegCenc"]), + Asset.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Asset resource. + * @member {"video"|"image"|undefined} resource + * @memberof google.cloud.video.livestream.v1.Asset + * @instance + */ + Object.defineProperty(Asset.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["video", "image"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Encryption instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static - * @param {google.cloud.video.livestream.v1.IEncryption=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption} Encryption instance + * @param {google.cloud.video.livestream.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Asset} Asset instance */ - Encryption.create = function create(properties) { - return new Encryption(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static - * @param {google.cloud.video.livestream.v1.IEncryption} message Encryption message or plain object to encode + * @param {google.cloud.video.livestream.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encryption.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.drmSystems != null && Object.hasOwnProperty.call(message, "drmSystems")) - $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.encode(message.drmSystems, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.aes128 != null && Object.hasOwnProperty.call(message, "aes128")) - $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.encode(message.aes128, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) - $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) - $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.secretManagerKeySource != null && Object.hasOwnProperty.call(message, "secretManagerKeySource")) - $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.encode(message.secretManagerKeySource, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.video != null && Object.hasOwnProperty.call(message, "video")) + $root.google.cloud.video.livestream.v1.Asset.VideoAsset.encode(message.video, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.video.livestream.v1.Asset.ImageAsset.encode(message.image, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.crc32c != null && Object.hasOwnProperty.call(message, "crc32c")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.crc32c); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static - * @param {google.cloud.video.livestream.v1.IEncryption} message Encryption message or plain object to encode + * @param {google.cloud.video.livestream.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Encryption.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Encryption message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + * @returns {google.cloud.video.livestream.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Encryption.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Asset(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.name = reader.string(); break; } - case 7: { - message.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.decode(reader, reader.uint32()); + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } case 5: { - message.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); + message.video = $root.google.cloud.video.livestream.v1.Asset.VideoAsset.decode(reader, reader.uint32()); break; } case 6: { - message.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); + message.image = $root.google.cloud.video.livestream.v1.Asset.ImageAsset.decode(reader, reader.uint32()); + break; + } + case 7: { + message.crc32c = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } default: @@ -10638,210 +10960,271 @@ }; /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + * @returns {google.cloud.video.livestream.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Encryption.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Encryption message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Encryption.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.secretManagerKeySource != null && message.hasOwnProperty("secretManagerKeySource")) { - properties.secretSource = 1; - { - var error = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify(message.secretManagerKeySource); - if (error) - return "secretManagerKeySource." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.drmSystems != null && message.hasOwnProperty("drmSystems")) { - var error = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.verify(message.drmSystems); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "drmSystems." + error; + return "updateTime." + error; } - if (message.aes128 != null && message.hasOwnProperty("aes128")) { - properties.encryptionMode = 1; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.video != null && message.hasOwnProperty("video")) { + properties.resource = 1; { - var error = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify(message.aes128); + var error = $root.google.cloud.video.livestream.v1.Asset.VideoAsset.verify(message.video); if (error) - return "aes128." + error; + return "video." + error; } } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; + if (message.image != null && message.hasOwnProperty("image")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; { - var error = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify(message.sampleAes); + var error = $root.google.cloud.video.livestream.v1.Asset.ImageAsset.verify(message.image); if (error) - return "sampleAes." + error; + return "image." + error; } } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); - if (error) - return "mpegCenc." + error; + if (message.crc32c != null && message.hasOwnProperty("crc32c")) + if (!$util.isString(message.crc32c)) + return "crc32c: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; } return null; }; /** - * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + * @returns {google.cloud.video.livestream.v1.Asset} Asset */ - Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Asset) return object; - var message = new $root.google.cloud.video.livestream.v1.Encryption(); - if (object.id != null) - message.id = String(object.id); - if (object.secretManagerKeySource != null) { - if (typeof object.secretManagerKeySource !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.secretManagerKeySource: object expected"); - message.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.fromObject(object.secretManagerKeySource); + var message = new $root.google.cloud.video.livestream.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.drmSystems != null) { - if (typeof object.drmSystems !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.drmSystems: object expected"); - message.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.fromObject(object.drmSystems); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.aes128 != null) { - if (typeof object.aes128 !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.aes128: object expected"); - message.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.fromObject(object.aes128); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.sampleAes != null) { - if (typeof object.sampleAes !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.sampleAes: object expected"); - message.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); + if (object.video != null) { + if (typeof object.video !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.video: object expected"); + message.video = $root.google.cloud.video.livestream.v1.Asset.VideoAsset.fromObject(object.video); } - if (object.mpegCenc != null) { - if (typeof object.mpegCenc !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.mpegCenc: object expected"); - message.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.image: object expected"); + message.image = $root.google.cloud.video.livestream.v1.Asset.ImageAsset.fromObject(object.image); + } + if (object.crc32c != null) + message.crc32c = String(object.crc32c); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Asset.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); } return message; }; /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static - * @param {google.cloud.video.livestream.v1.Encryption} message Encryption + * @param {google.cloud.video.livestream.v1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Encryption.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.id = ""; - object.drmSystems = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.drmSystems != null && message.hasOwnProperty("drmSystems")) - object.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.toObject(message.drmSystems, options); - if (message.aes128 != null && message.hasOwnProperty("aes128")) { - object.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.toObject(message.aes128, options); - if (options.oneofs) - object.encryptionMode = "aes128"; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.crc32c = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.error = null; } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - object.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); - if (options.oneofs) - object.encryptionMode = "sampleAes"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - object.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); + if (message.video != null && message.hasOwnProperty("video")) { + object.video = $root.google.cloud.video.livestream.v1.Asset.VideoAsset.toObject(message.video, options); if (options.oneofs) - object.encryptionMode = "mpegCenc"; + object.resource = "video"; } - if (message.secretManagerKeySource != null && message.hasOwnProperty("secretManagerKeySource")) { - object.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.toObject(message.secretManagerKeySource, options); + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.google.cloud.video.livestream.v1.Asset.ImageAsset.toObject(message.image, options); if (options.oneofs) - object.secretSource = "secretManagerKeySource"; + object.resource = "image"; } + if (message.crc32c != null && message.hasOwnProperty("crc32c")) + object.crc32c = message.crc32c; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.video.livestream.v1.Asset.State[message.state] === undefined ? message.state : $root.google.cloud.video.livestream.v1.Asset.State[message.state] : message.state; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); return object; }; /** - * Converts this Encryption to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @instance * @returns {Object.} JSON object */ - Encryption.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Encryption + * Gets the default type url for Asset * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption + * @memberof google.cloud.video.livestream.v1.Asset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Encryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Asset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Asset"; }; - Encryption.SecretManagerSource = (function() { + Asset.VideoAsset = (function() { /** - * Properties of a SecretManagerSource. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface ISecretManagerSource - * @property {string|null} [secretVersion] SecretManagerSource secretVersion + * Properties of a VideoAsset. + * @memberof google.cloud.video.livestream.v1.Asset + * @interface IVideoAsset + * @property {string|null} [uri] VideoAsset uri */ /** - * Constructs a new SecretManagerSource. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a SecretManagerSource. - * @implements ISecretManagerSource + * Constructs a new VideoAsset. + * @memberof google.cloud.video.livestream.v1.Asset + * @classdesc Represents a VideoAsset. + * @implements IVideoAsset * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.Asset.IVideoAsset=} [properties] Properties to set */ - function SecretManagerSource(properties) { + function VideoAsset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10849,75 +11232,75 @@ } /** - * SecretManagerSource secretVersion. - * @member {string} secretVersion - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * VideoAsset uri. + * @member {string} uri + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @instance */ - SecretManagerSource.prototype.secretVersion = ""; + VideoAsset.prototype.uri = ""; /** - * Creates a new SecretManagerSource instance using the specified properties. + * Creates a new VideoAsset instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource instance + * @param {google.cloud.video.livestream.v1.Asset.IVideoAsset=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Asset.VideoAsset} VideoAsset instance */ - SecretManagerSource.create = function create(properties) { - return new SecretManagerSource(properties); + VideoAsset.create = function create(properties) { + return new VideoAsset(properties); }; /** - * Encodes the specified SecretManagerSource message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * Encodes the specified VideoAsset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.VideoAsset.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource} message SecretManagerSource message or plain object to encode + * @param {google.cloud.video.livestream.v1.Asset.IVideoAsset} message VideoAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecretManagerSource.encode = function encode(message, writer) { + VideoAsset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.secretVersion != null && Object.hasOwnProperty.call(message, "secretVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretVersion); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified SecretManagerSource message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * Encodes the specified VideoAsset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.VideoAsset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource} message SecretManagerSource message or plain object to encode + * @param {google.cloud.video.livestream.v1.Asset.IVideoAsset} message VideoAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecretManagerSource.encodeDelimited = function encodeDelimited(message, writer) { + VideoAsset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecretManagerSource message from the specified reader or buffer. + * Decodes a VideoAsset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + * @returns {google.cloud.video.livestream.v1.Asset.VideoAsset} VideoAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecretManagerSource.decode = function decode(reader, length) { + VideoAsset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Asset.VideoAsset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.secretVersion = reader.string(); + message.uri = reader.string(); break; } default: @@ -10929,121 +11312,122 @@ }; /** - * Decodes a SecretManagerSource message from the specified reader or buffer, length delimited. + * Decodes a VideoAsset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + * @returns {google.cloud.video.livestream.v1.Asset.VideoAsset} VideoAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecretManagerSource.decodeDelimited = function decodeDelimited(reader) { + VideoAsset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecretManagerSource message. + * Verifies a VideoAsset message. * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecretManagerSource.verify = function verify(message) { + VideoAsset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) - if (!$util.isString(message.secretVersion)) - return "secretVersion: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a SecretManagerSource message from a plain object. Also converts values to their respective internal types. + * Creates a VideoAsset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + * @returns {google.cloud.video.livestream.v1.Asset.VideoAsset} VideoAsset */ - SecretManagerSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource) + VideoAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Asset.VideoAsset) return object; - var message = new $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource(); - if (object.secretVersion != null) - message.secretVersion = String(object.secretVersion); + var message = new $root.google.cloud.video.livestream.v1.Asset.VideoAsset(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a SecretManagerSource message. Also converts values to other types if specified. + * Creates a plain object from a VideoAsset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} message SecretManagerSource + * @param {google.cloud.video.livestream.v1.Asset.VideoAsset} message VideoAsset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecretManagerSource.toObject = function toObject(message, options) { + VideoAsset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.secretVersion = ""; - if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) - object.secretVersion = message.secretVersion; + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this SecretManagerSource to JSON. + * Converts this VideoAsset to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @instance * @returns {Object.} JSON object */ - SecretManagerSource.prototype.toJSON = function toJSON() { + VideoAsset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecretManagerSource + * Gets the default type url for VideoAsset * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @memberof google.cloud.video.livestream.v1.Asset.VideoAsset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecretManagerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VideoAsset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.SecretManagerSource"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Asset.VideoAsset"; }; - return SecretManagerSource; + return VideoAsset; })(); - Encryption.Widevine = (function() { + Asset.ImageAsset = (function() { /** - * Properties of a Widevine. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IWidevine + * Properties of an ImageAsset. + * @memberof google.cloud.video.livestream.v1.Asset + * @interface IImageAsset + * @property {string|null} [uri] ImageAsset uri */ /** - * Constructs a new Widevine. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a Widevine. - * @implements IWidevine + * Constructs a new ImageAsset. + * @memberof google.cloud.video.livestream.v1.Asset + * @classdesc Represents an ImageAsset. + * @implements IImageAsset * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IWidevine=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.Asset.IImageAsset=} [properties] Properties to set */ - function Widevine(properties) { + function ImageAsset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11051,63 +11435,77 @@ } /** - * Creates a new Widevine instance using the specified properties. + * ImageAsset uri. + * @member {string} uri + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset + * @instance + */ + ImageAsset.prototype.uri = ""; + + /** + * Creates a new ImageAsset instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.IWidevine=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine instance + * @param {google.cloud.video.livestream.v1.Asset.IImageAsset=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Asset.ImageAsset} ImageAsset instance */ - Widevine.create = function create(properties) { - return new Widevine(properties); + ImageAsset.create = function create(properties) { + return new ImageAsset(properties); }; /** - * Encodes the specified Widevine message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * Encodes the specified ImageAsset message. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.ImageAsset.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.IWidevine} message Widevine message or plain object to encode + * @param {google.cloud.video.livestream.v1.Asset.IImageAsset} message ImageAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widevine.encode = function encode(message, writer) { + ImageAsset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified Widevine message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * Encodes the specified ImageAsset message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Asset.ImageAsset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.IWidevine} message Widevine message or plain object to encode + * @param {google.cloud.video.livestream.v1.Asset.IImageAsset} message ImageAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widevine.encodeDelimited = function encodeDelimited(message, writer) { + ImageAsset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Widevine message from the specified reader or buffer. + * Decodes an ImageAsset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + * @returns {google.cloud.video.livestream.v1.Asset.ImageAsset} ImageAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widevine.decode = function decode(reader, length) { + ImageAsset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Widevine(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Asset.ImageAsset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11117,2049 +11515,5469 @@ }; /** - * Decodes a Widevine message from the specified reader or buffer, length delimited. + * Decodes an ImageAsset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + * @returns {google.cloud.video.livestream.v1.Asset.ImageAsset} ImageAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widevine.decodeDelimited = function decodeDelimited(reader) { + ImageAsset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Widevine message. + * Verifies an ImageAsset message. * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Widevine.verify = function verify(message) { + ImageAsset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a Widevine message from a plain object. Also converts values to their respective internal types. + * Creates an ImageAsset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + * @returns {google.cloud.video.livestream.v1.Asset.ImageAsset} ImageAsset */ - Widevine.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Widevine) + ImageAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Asset.ImageAsset) return object; - return new $root.google.cloud.video.livestream.v1.Encryption.Widevine(); + var message = new $root.google.cloud.video.livestream.v1.Asset.ImageAsset(); + if (object.uri != null) + message.uri = String(object.uri); + return message; }; /** - * Creates a plain object from a Widevine message. Also converts values to other types if specified. + * Creates a plain object from an ImageAsset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static - * @param {google.cloud.video.livestream.v1.Encryption.Widevine} message Widevine + * @param {google.cloud.video.livestream.v1.Asset.ImageAsset} message ImageAsset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Widevine.toObject = function toObject() { - return {}; + ImageAsset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; }; /** - * Converts this Widevine to JSON. + * Converts this ImageAsset to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @instance * @returns {Object.} JSON object */ - Widevine.prototype.toJSON = function toJSON() { + ImageAsset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Widevine + * Gets the default type url for ImageAsset * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @memberof google.cloud.video.livestream.v1.Asset.ImageAsset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Widevine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImageAsset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Widevine"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Asset.ImageAsset"; }; - return Widevine; + return ImageAsset; })(); - Encryption.Fairplay = (function() { + /** + * State enum. + * @name google.cloud.video.livestream.v1.Asset.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + Asset.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); - /** - * Properties of a Fairplay. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IFairplay - */ + return Asset; + })(); - /** - * Constructs a new Fairplay. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a Fairplay. - * @implements IFairplay - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IFairplay=} [properties] Properties to set - */ - function Fairplay(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.Encryption = (function() { - /** - * Creates a new Fairplay instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IFairplay=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay instance - */ - Fairplay.create = function create(properties) { - return new Fairplay(properties); - }; + /** + * Properties of an Encryption. + * @memberof google.cloud.video.livestream.v1 + * @interface IEncryption + * @property {string|null} [id] Encryption id + * @property {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null} [secretManagerKeySource] Encryption secretManagerKeySource + * @property {google.cloud.video.livestream.v1.Encryption.IDrmSystems|null} [drmSystems] Encryption drmSystems + * @property {google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null} [aes128] Encryption aes128 + * @property {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes + * @property {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc + */ - /** - * Encodes the specified Fairplay message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IFairplay} message Fairplay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fairplay.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Constructs a new Encryption. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents an Encryption. + * @implements IEncryption + * @constructor + * @param {google.cloud.video.livestream.v1.IEncryption=} [properties] Properties to set + */ + function Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Fairplay message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IFairplay} message Fairplay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fairplay.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encryption id. + * @member {string} id + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.id = ""; - /** - * Decodes a Fairplay message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fairplay.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Fairplay(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encryption secretManagerKeySource. + * @member {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource|null|undefined} secretManagerKeySource + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.secretManagerKeySource = null; - /** - * Decodes a Fairplay message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fairplay.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encryption drmSystems. + * @member {google.cloud.video.livestream.v1.Encryption.IDrmSystems|null|undefined} drmSystems + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.drmSystems = null; - /** - * Verifies a Fairplay message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Fairplay.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Encryption aes128. + * @member {google.cloud.video.livestream.v1.Encryption.IAes128Encryption|null|undefined} aes128 + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.aes128 = null; - /** - * Creates a Fairplay message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay - */ - Fairplay.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Fairplay) - return object; - return new $root.google.cloud.video.livestream.v1.Encryption.Fairplay(); - }; + /** + * Encryption sampleAes. + * @member {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption|null|undefined} sampleAes + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.sampleAes = null; - /** - * Creates a plain object from a Fairplay message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {google.cloud.video.livestream.v1.Encryption.Fairplay} message Fairplay - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fairplay.toObject = function toObject() { - return {}; - }; + /** + * Encryption mpegCenc. + * @member {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Encryption.prototype.mpegCenc = null; - /** - * Converts this Fairplay to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @instance - * @returns {Object.} JSON object - */ - Fairplay.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Gets the default type url for Fairplay - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Fairplay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Fairplay"; - }; + /** + * Encryption secretSource. + * @member {"secretManagerKeySource"|undefined} secretSource + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Object.defineProperty(Encryption.prototype, "secretSource", { + get: $util.oneOfGetter($oneOfFields = ["secretManagerKeySource"]), + set: $util.oneOfSetter($oneOfFields) + }); - return Fairplay; - })(); + /** + * Encryption encryptionMode. + * @member {"aes128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + */ + Object.defineProperty(Encryption.prototype, "encryptionMode", { + get: $util.oneOfGetter($oneOfFields = ["aes128", "sampleAes", "mpegCenc"]), + set: $util.oneOfSetter($oneOfFields) + }); - Encryption.Playready = (function() { + /** + * Creates a new Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {google.cloud.video.livestream.v1.IEncryption=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption} Encryption instance + */ + Encryption.create = function create(properties) { + return new Encryption(properties); + }; - /** - * Properties of a Playready. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IPlayready - */ + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {google.cloud.video.livestream.v1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.drmSystems != null && Object.hasOwnProperty.call(message, "drmSystems")) + $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.encode(message.drmSystems, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.aes128 != null && Object.hasOwnProperty.call(message, "aes128")) + $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.encode(message.aes128, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) + $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) + $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.secretManagerKeySource != null && Object.hasOwnProperty.call(message, "secretManagerKeySource")) + $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.encode(message.secretManagerKeySource, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new Playready. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a Playready. - * @implements IPlayready - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IPlayready=} [properties] Properties to set - */ - function Playready(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {google.cloud.video.livestream.v1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new Playready instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IPlayready=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready instance - */ - Playready.create = function create(properties) { - return new Playready(properties); - }; + /** + * Decodes an Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 7: { + message.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.decode(reader, reader.uint32()); + break; + } + case 4: { + message.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); + break; + } + case 5: { + message.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); + break; + } + case 6: { + message.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encryption message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.secretManagerKeySource != null && message.hasOwnProperty("secretManagerKeySource")) { + properties.secretSource = 1; + { + var error = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify(message.secretManagerKeySource); + if (error) + return "secretManagerKeySource." + error; + } + } + if (message.drmSystems != null && message.hasOwnProperty("drmSystems")) { + var error = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.verify(message.drmSystems); + if (error) + return "drmSystems." + error; + } + if (message.aes128 != null && message.hasOwnProperty("aes128")) { + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify(message.aes128); + if (error) + return "aes128." + error; + } + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify(message.sampleAes); + if (error) + return "sampleAes." + error; + } + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); + if (error) + return "mpegCenc." + error; + } + } + return null; + }; + + /** + * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption} Encryption + */ + Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption) + return object; + var message = new $root.google.cloud.video.livestream.v1.Encryption(); + if (object.id != null) + message.id = String(object.id); + if (object.secretManagerKeySource != null) { + if (typeof object.secretManagerKeySource !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.secretManagerKeySource: object expected"); + message.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.fromObject(object.secretManagerKeySource); + } + if (object.drmSystems != null) { + if (typeof object.drmSystems !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.drmSystems: object expected"); + message.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.fromObject(object.drmSystems); + } + if (object.aes128 != null) { + if (typeof object.aes128 !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.aes128: object expected"); + message.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.fromObject(object.aes128); + } + if (object.sampleAes != null) { + if (typeof object.sampleAes !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.sampleAes: object expected"); + message.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); + } + if (object.mpegCenc != null) { + if (typeof object.mpegCenc !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.mpegCenc: object expected"); + message.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); + } + return message; + }; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption} message Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.drmSystems = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.drmSystems != null && message.hasOwnProperty("drmSystems")) + object.drmSystems = $root.google.cloud.video.livestream.v1.Encryption.DrmSystems.toObject(message.drmSystems, options); + if (message.aes128 != null && message.hasOwnProperty("aes128")) { + object.aes128 = $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.toObject(message.aes128, options); + if (options.oneofs) + object.encryptionMode = "aes128"; + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + object.sampleAes = $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); + if (options.oneofs) + object.encryptionMode = "sampleAes"; + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + object.mpegCenc = $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); + if (options.oneofs) + object.encryptionMode = "mpegCenc"; + } + if (message.secretManagerKeySource != null && message.hasOwnProperty("secretManagerKeySource")) { + object.secretManagerKeySource = $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.toObject(message.secretManagerKeySource, options); + if (options.oneofs) + object.secretSource = "secretManagerKeySource"; + } + return object; + }; + + /** + * Converts this Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption + * @instance + * @returns {Object.} JSON object + */ + Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encryption + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption"; + }; + + Encryption.SecretManagerSource = (function() { /** - * Encodes the specified Playready message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IPlayready} message Playready message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Properties of a SecretManagerSource. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface ISecretManagerSource + * @property {string|null} [secretVersion] SecretManagerSource secretVersion */ - Playready.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - /** - * Encodes the specified Playready message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IPlayready} message Playready message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Playready.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new SecretManagerSource. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a SecretManagerSource. + * @implements ISecretManagerSource + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource=} [properties] Properties to set + */ + function SecretManagerSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretManagerSource secretVersion. + * @member {string} secretVersion + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @instance + */ + SecretManagerSource.prototype.secretVersion = ""; + + /** + * Creates a new SecretManagerSource instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource instance + */ + SecretManagerSource.create = function create(properties) { + return new SecretManagerSource(properties); + }; + + /** + * Encodes the specified SecretManagerSource message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource} message SecretManagerSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secretVersion != null && Object.hasOwnProperty.call(message, "secretVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretVersion); + return writer; + }; + + /** + * Encodes the specified SecretManagerSource message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SecretManagerSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISecretManagerSource} message SecretManagerSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretManagerSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.secretVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretManagerSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretManagerSource message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretManagerSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + if (!$util.isString(message.secretVersion)) + return "secretVersion: string expected"; + return null; + }; + + /** + * Creates a SecretManagerSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} SecretManagerSource + */ + SecretManagerSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource) + return object; + var message = new $root.google.cloud.video.livestream.v1.Encryption.SecretManagerSource(); + if (object.secretVersion != null) + message.secretVersion = String(object.secretVersion); + return message; + }; + + /** + * Creates a plain object from a SecretManagerSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {google.cloud.video.livestream.v1.Encryption.SecretManagerSource} message SecretManagerSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretManagerSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.secretVersion = ""; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + object.secretVersion = message.secretVersion; + return object; + }; + + /** + * Converts this SecretManagerSource to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @instance + * @returns {Object.} JSON object + */ + SecretManagerSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretManagerSource + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.SecretManagerSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.SecretManagerSource"; + }; + + return SecretManagerSource; + })(); + + Encryption.Widevine = (function() { + + /** + * Properties of a Widevine. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IWidevine + */ + + /** + * Constructs a new Widevine. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a Widevine. + * @implements IWidevine + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IWidevine=} [properties] Properties to set + */ + function Widevine(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Widevine instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IWidevine=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine instance + */ + Widevine.create = function create(properties) { + return new Widevine(properties); + }; + + /** + * Encodes the specified Widevine message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IWidevine} message Widevine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widevine.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Widevine message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Widevine.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IWidevine} message Widevine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widevine.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Widevine message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widevine.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Widevine(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Widevine message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widevine.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Widevine message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Widevine.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Widevine message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.Widevine} Widevine + */ + Widevine.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Widevine) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.Widevine(); + }; + + /** + * Creates a plain object from a Widevine message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {google.cloud.video.livestream.v1.Encryption.Widevine} message Widevine + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Widevine.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Widevine to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @instance + * @returns {Object.} JSON object + */ + Widevine.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Widevine + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.Widevine + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Widevine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Widevine"; + }; + + return Widevine; + })(); + + Encryption.Fairplay = (function() { + + /** + * Properties of a Fairplay. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IFairplay + */ + + /** + * Constructs a new Fairplay. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a Fairplay. + * @implements IFairplay + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IFairplay=} [properties] Properties to set + */ + function Fairplay(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Fairplay instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IFairplay=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay instance + */ + Fairplay.create = function create(properties) { + return new Fairplay(properties); + }; + + /** + * Encodes the specified Fairplay message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IFairplay} message Fairplay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fairplay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Fairplay message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Fairplay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IFairplay} message Fairplay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fairplay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fairplay message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fairplay.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Fairplay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fairplay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fairplay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fairplay message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fairplay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Fairplay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.Fairplay} Fairplay + */ + Fairplay.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Fairplay) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.Fairplay(); + }; + + /** + * Creates a plain object from a Fairplay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {google.cloud.video.livestream.v1.Encryption.Fairplay} message Fairplay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fairplay.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Fairplay to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @instance + * @returns {Object.} JSON object + */ + Fairplay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Fairplay + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.Fairplay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Fairplay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Fairplay"; + }; + + return Fairplay; + })(); + + Encryption.Playready = (function() { + + /** + * Properties of a Playready. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IPlayready + */ + + /** + * Constructs a new Playready. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a Playready. + * @implements IPlayready + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IPlayready=} [properties] Properties to set + */ + function Playready(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Playready instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IPlayready=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready instance + */ + Playready.create = function create(properties) { + return new Playready(properties); + }; + + /** + * Encodes the specified Playready message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IPlayready} message Playready message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Playready.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Playready message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Playready.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IPlayready} message Playready message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Playready.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Playready message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Playready.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Playready(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Playready message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Playready.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Playready message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Playready.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Playready message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready + */ + Playready.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Playready) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.Playready(); + }; + + /** + * Creates a plain object from a Playready message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {google.cloud.video.livestream.v1.Encryption.Playready} message Playready + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Playready.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Playready to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @instance + * @returns {Object.} JSON object + */ + Playready.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Playready + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.Playready + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Playready.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Playready"; + }; + + return Playready; + })(); + + Encryption.Clearkey = (function() { + + /** + * Properties of a Clearkey. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IClearkey + */ + + /** + * Constructs a new Clearkey. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a Clearkey. + * @implements IClearkey + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IClearkey=} [properties] Properties to set + */ + function Clearkey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Clearkey instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IClearkey=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey instance + */ + Clearkey.create = function create(properties) { + return new Clearkey(properties); + }; + + /** + * Encodes the specified Clearkey message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Clearkey.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IClearkey} message Clearkey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Clearkey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Clearkey message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Clearkey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IClearkey} message Clearkey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Clearkey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Clearkey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Clearkey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Clearkey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Clearkey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Clearkey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Clearkey message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Clearkey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Clearkey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey + */ + Clearkey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Clearkey) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.Clearkey(); + }; + + /** + * Creates a plain object from a Clearkey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {google.cloud.video.livestream.v1.Encryption.Clearkey} message Clearkey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Clearkey.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Clearkey to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @instance + * @returns {Object.} JSON object + */ + Clearkey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Clearkey + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Clearkey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Clearkey"; + }; + + return Clearkey; + })(); + + Encryption.DrmSystems = (function() { + + /** + * Properties of a DrmSystems. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IDrmSystems + * @property {google.cloud.video.livestream.v1.Encryption.IWidevine|null} [widevine] DrmSystems widevine + * @property {google.cloud.video.livestream.v1.Encryption.IFairplay|null} [fairplay] DrmSystems fairplay + * @property {google.cloud.video.livestream.v1.Encryption.IPlayready|null} [playready] DrmSystems playready + * @property {google.cloud.video.livestream.v1.Encryption.IClearkey|null} [clearkey] DrmSystems clearkey + */ + + /** + * Constructs a new DrmSystems. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a DrmSystems. + * @implements IDrmSystems + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems=} [properties] Properties to set + */ + function DrmSystems(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DrmSystems widevine. + * @member {google.cloud.video.livestream.v1.Encryption.IWidevine|null|undefined} widevine + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @instance + */ + DrmSystems.prototype.widevine = null; + + /** + * DrmSystems fairplay. + * @member {google.cloud.video.livestream.v1.Encryption.IFairplay|null|undefined} fairplay + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @instance + */ + DrmSystems.prototype.fairplay = null; + + /** + * DrmSystems playready. + * @member {google.cloud.video.livestream.v1.Encryption.IPlayready|null|undefined} playready + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @instance + */ + DrmSystems.prototype.playready = null; + + /** + * DrmSystems clearkey. + * @member {google.cloud.video.livestream.v1.Encryption.IClearkey|null|undefined} clearkey + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @instance + */ + DrmSystems.prototype.clearkey = null; + + /** + * Creates a new DrmSystems instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems instance + */ + DrmSystems.create = function create(properties) { + return new DrmSystems(properties); + }; + + /** + * Encodes the specified DrmSystems message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.DrmSystems.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems} message DrmSystems message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DrmSystems.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.widevine != null && Object.hasOwnProperty.call(message, "widevine")) + $root.google.cloud.video.livestream.v1.Encryption.Widevine.encode(message.widevine, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fairplay != null && Object.hasOwnProperty.call(message, "fairplay")) + $root.google.cloud.video.livestream.v1.Encryption.Fairplay.encode(message.fairplay, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.playready != null && Object.hasOwnProperty.call(message, "playready")) + $root.google.cloud.video.livestream.v1.Encryption.Playready.encode(message.playready, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clearkey != null && Object.hasOwnProperty.call(message, "clearkey")) + $root.google.cloud.video.livestream.v1.Encryption.Clearkey.encode(message.clearkey, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DrmSystems message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.DrmSystems.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems} message DrmSystems message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DrmSystems.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DrmSystems message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DrmSystems.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.DrmSystems(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.decode(reader, reader.uint32()); + break; + } + case 2: { + message.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.decode(reader, reader.uint32()); + break; + } + case 3: { + message.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.decode(reader, reader.uint32()); + break; + } + case 4: { + message.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DrmSystems message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DrmSystems.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DrmSystems message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DrmSystems.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.widevine != null && message.hasOwnProperty("widevine")) { + var error = $root.google.cloud.video.livestream.v1.Encryption.Widevine.verify(message.widevine); + if (error) + return "widevine." + error; + } + if (message.fairplay != null && message.hasOwnProperty("fairplay")) { + var error = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.verify(message.fairplay); + if (error) + return "fairplay." + error; + } + if (message.playready != null && message.hasOwnProperty("playready")) { + var error = $root.google.cloud.video.livestream.v1.Encryption.Playready.verify(message.playready); + if (error) + return "playready." + error; + } + if (message.clearkey != null && message.hasOwnProperty("clearkey")) { + var error = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.verify(message.clearkey); + if (error) + return "clearkey." + error; + } + return null; + }; + + /** + * Creates a DrmSystems message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems + */ + DrmSystems.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.DrmSystems) + return object; + var message = new $root.google.cloud.video.livestream.v1.Encryption.DrmSystems(); + if (object.widevine != null) { + if (typeof object.widevine !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.widevine: object expected"); + message.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.fromObject(object.widevine); + } + if (object.fairplay != null) { + if (typeof object.fairplay !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.fairplay: object expected"); + message.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.fromObject(object.fairplay); + } + if (object.playready != null) { + if (typeof object.playready !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.playready: object expected"); + message.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.fromObject(object.playready); + } + if (object.clearkey != null) { + if (typeof object.clearkey !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.clearkey: object expected"); + message.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.fromObject(object.clearkey); + } + return message; + }; + + /** + * Creates a plain object from a DrmSystems message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {google.cloud.video.livestream.v1.Encryption.DrmSystems} message DrmSystems + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DrmSystems.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.widevine = null; + object.fairplay = null; + object.playready = null; + object.clearkey = null; + } + if (message.widevine != null && message.hasOwnProperty("widevine")) + object.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.toObject(message.widevine, options); + if (message.fairplay != null && message.hasOwnProperty("fairplay")) + object.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.toObject(message.fairplay, options); + if (message.playready != null && message.hasOwnProperty("playready")) + object.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.toObject(message.playready, options); + if (message.clearkey != null && message.hasOwnProperty("clearkey")) + object.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.toObject(message.clearkey, options); + return object; + }; + + /** + * Converts this DrmSystems to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @instance + * @returns {Object.} JSON object + */ + DrmSystems.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DrmSystems + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DrmSystems.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.DrmSystems"; + }; + + return DrmSystems; + })(); + + Encryption.Aes128Encryption = (function() { + + /** + * Properties of an Aes128Encryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IAes128Encryption + */ + + /** + * Constructs a new Aes128Encryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents an Aes128Encryption. + * @implements IAes128Encryption + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption=} [properties] Properties to set + */ + function Aes128Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Aes128Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption instance + */ + Aes128Encryption.create = function create(properties) { + return new Aes128Encryption(properties); + }; + + /** + * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aes128Encryption message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aes128Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption + */ + Aes128Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption(); + }; + + /** + * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} message Aes128Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aes128Encryption.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Aes128Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @instance + * @returns {Object.} JSON object + */ + Aes128Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Aes128Encryption + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aes128Encryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Aes128Encryption"; + }; + + return Aes128Encryption; + })(); + + Encryption.SampleAesEncryption = (function() { + + /** + * Properties of a SampleAesEncryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface ISampleAesEncryption + */ + + /** + * Constructs a new SampleAesEncryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a SampleAesEncryption. + * @implements ISampleAesEncryption + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set + */ + function SampleAesEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SampleAesEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption instance + */ + SampleAesEncryption.create = function create(properties) { + return new SampleAesEncryption(properties); + }; + + /** + * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SampleAesEncryption message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SampleAesEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption + */ + SampleAesEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption) + return object; + return new $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption(); + }; + + /** + * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} message SampleAesEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SampleAesEncryption.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SampleAesEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @instance + * @returns {Object.} JSON object + */ + SampleAesEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SampleAesEncryption + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SampleAesEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.SampleAesEncryption"; + }; + + return SampleAesEncryption; + })(); + + Encryption.MpegCommonEncryption = (function() { + + /** + * Properties of a MpegCommonEncryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @interface IMpegCommonEncryption + * @property {string|null} [scheme] MpegCommonEncryption scheme + */ + + /** + * Constructs a new MpegCommonEncryption. + * @memberof google.cloud.video.livestream.v1.Encryption + * @classdesc Represents a MpegCommonEncryption. + * @implements IMpegCommonEncryption + * @constructor + * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + */ + function MpegCommonEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MpegCommonEncryption scheme. + * @member {string} scheme + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @instance + */ + MpegCommonEncryption.prototype.scheme = ""; + + /** + * Creates a new MpegCommonEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance + */ + MpegCommonEncryption.create = function create(properties) { + return new MpegCommonEncryption(properties); + }; + + /** + * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.scheme); + return writer; + }; + + /** + * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheme = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MpegCommonEncryption message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MpegCommonEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheme != null && message.hasOwnProperty("scheme")) + if (!$util.isString(message.scheme)) + return "scheme: string expected"; + return null; + }; + + /** + * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + */ + MpegCommonEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption) + return object; + var message = new $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption(); + if (object.scheme != null) + message.scheme = String(object.scheme); + return message; + }; + + /** + * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} message MpegCommonEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MpegCommonEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scheme = ""; + if (message.scheme != null && message.hasOwnProperty("scheme")) + object.scheme = message.scheme; + return object; + }; + + /** + * Converts this MpegCommonEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @instance + * @returns {Object.} JSON object + */ + MpegCommonEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MpegCommonEncryption + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MpegCommonEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption"; + }; + + return MpegCommonEncryption; + })(); + + return Encryption; + })(); + + v1.Pool = (function() { + + /** + * Properties of a Pool. + * @memberof google.cloud.video.livestream.v1 + * @interface IPool + * @property {string|null} [name] Pool name + * @property {google.protobuf.ITimestamp|null} [createTime] Pool createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Pool updateTime + * @property {Object.|null} [labels] Pool labels + * @property {google.cloud.video.livestream.v1.Pool.INetworkConfig|null} [networkConfig] Pool networkConfig + */ + + /** + * Constructs a new Pool. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a Pool. + * @implements IPool + * @constructor + * @param {google.cloud.video.livestream.v1.IPool=} [properties] Properties to set + */ + function Pool(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pool name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + */ + Pool.prototype.name = ""; + + /** + * Pool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + */ + Pool.prototype.createTime = null; + + /** + * Pool updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + */ + Pool.prototype.updateTime = null; + + /** + * Pool labels. + * @member {Object.} labels + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + */ + Pool.prototype.labels = $util.emptyObject; + + /** + * Pool networkConfig. + * @member {google.cloud.video.livestream.v1.Pool.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + */ + Pool.prototype.networkConfig = null; + + /** + * Creates a new Pool instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {google.cloud.video.livestream.v1.IPool=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Pool} Pool instance + */ + Pool.create = function create(properties) { + return new Pool(properties); + }; + + /** + * Encodes the specified Pool message. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {google.cloud.video.livestream.v1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.video.livestream.v1.Pool.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Pool message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {google.cloud.video.livestream.v1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Pool(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 5: { + message.networkConfig = $root.google.cloud.video.livestream.v1.Pool.NetworkConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pool message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.video.livestream.v1.Pool.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + return null; + }; + + /** + * Creates a Pool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Pool} Pool + */ + Pool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Pool) + return object; + var message = new $root.google.cloud.video.livestream.v1.Pool(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Pool.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Pool.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Pool.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.video.livestream.v1.Pool.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.video.livestream.v1.Pool.NetworkConfig.fromObject(object.networkConfig); + } + return message; + }; + + /** + * Creates a plain object from a Pool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {google.cloud.video.livestream.v1.Pool} message Pool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.networkConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.video.livestream.v1.Pool.NetworkConfig.toObject(message.networkConfig, options); + return object; + }; + + /** + * Converts this Pool to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Pool + * @instance + * @returns {Object.} JSON object + */ + Pool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Pool + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Pool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Pool"; + }; + + Pool.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.cloud.video.livestream.v1.Pool + * @interface INetworkConfig + * @property {string|null} [peeredNetwork] NetworkConfig peeredNetwork + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.cloud.video.livestream.v1.Pool + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.cloud.video.livestream.v1.Pool.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig peeredNetwork. + * @member {string} peeredNetwork + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @instance + */ + NetworkConfig.prototype.peeredNetwork = ""; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {google.cloud.video.livestream.v1.Pool.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.Pool.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {google.cloud.video.livestream.v1.Pool.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.peeredNetwork != null && Object.hasOwnProperty.call(message, "peeredNetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.peeredNetwork); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Pool.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {google.cloud.video.livestream.v1.Pool.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.Pool.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Pool.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.peeredNetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.Pool.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) + if (!$util.isString(message.peeredNetwork)) + return "peeredNetwork: string expected"; + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.Pool.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.Pool.NetworkConfig) + return object; + var message = new $root.google.cloud.video.livestream.v1.Pool.NetworkConfig(); + if (object.peeredNetwork != null) + message.peeredNetwork = String(object.peeredNetwork); + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {google.cloud.video.livestream.v1.Pool.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.peeredNetwork = ""; + if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) + object.peeredNetwork = message.peeredNetwork; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.Pool.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.Pool.NetworkConfig"; + }; + + return NetworkConfig; + })(); + + return Pool; + })(); + + v1.LivestreamService = (function() { + + /** + * Constructs a new LivestreamService service. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a LivestreamService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LivestreamService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LivestreamService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LivestreamService; + + /** + * Creates new LivestreamService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LivestreamService} RPC service. Useful where requests and/or responses are streamed. + */ + LivestreamService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef CreateChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateChannel. + * @function createChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.CreateChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.createChannel = function createChannel(request, callback) { + return this.rpcCall(createChannel, $root.google.cloud.video.livestream.v1.CreateChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateChannel" }); + + /** + * Calls CreateChannel. + * @function createChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listChannels}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef ListChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.ListChannelsResponse} [response] ListChannelsResponse + */ + + /** + * Calls ListChannels. + * @function listChannels + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListChannelsRequest} request ListChannelsRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.ListChannelsCallback} callback Node-style callback called with the error, if any, and ListChannelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.listChannels = function listChannels(request, callback) { + return this.rpcCall(listChannels, $root.google.cloud.video.livestream.v1.ListChannelsRequest, $root.google.cloud.video.livestream.v1.ListChannelsResponse, request, callback); + }, "name", { value: "ListChannels" }); + + /** + * Calls ListChannels. + * @function listChannels + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListChannelsRequest} request ListChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef GetChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Channel} [response] Channel + */ + + /** + * Calls GetChannel. + * @function getChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetChannelRequest} request GetChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.GetChannelCallback} callback Node-style callback called with the error, if any, and Channel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.getChannel = function getChannel(request, callback) { + return this.rpcCall(getChannel, $root.google.cloud.video.livestream.v1.GetChannelRequest, $root.google.cloud.video.livestream.v1.Channel, request, callback); + }, "name", { value: "GetChannel" }); + + /** + * Calls GetChannel. + * @function getChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetChannelRequest} request GetChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef DeleteChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteChannel. + * @function deleteChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.deleteChannel = function deleteChannel(request, callback) { + return this.rpcCall(deleteChannel, $root.google.cloud.video.livestream.v1.DeleteChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteChannel" }); + + /** + * Calls DeleteChannel. + * @function deleteChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef UpdateChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateChannel. + * @function updateChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.UpdateChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.updateChannel = function updateChannel(request, callback) { + return this.rpcCall(updateChannel, $root.google.cloud.video.livestream.v1.UpdateChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateChannel" }); + + /** + * Calls UpdateChannel. + * @function updateChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|startChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef StartChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls StartChannel. + * @function startChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IStartChannelRequest} request StartChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.StartChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.startChannel = function startChannel(request, callback) { + return this.rpcCall(startChannel, $root.google.cloud.video.livestream.v1.StartChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "StartChannel" }); + + /** + * Calls StartChannel. + * @function startChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IStartChannelRequest} request StartChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|stopChannel}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef StopChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls StopChannel. + * @function stopChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IStopChannelRequest} request StopChannelRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.StopChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.stopChannel = function stopChannel(request, callback) { + return this.rpcCall(stopChannel, $root.google.cloud.video.livestream.v1.StopChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "StopChannel" }); + + /** + * Calls StopChannel. + * @function stopChannel + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IStopChannelRequest} request StopChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createInput}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef CreateInputCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateInput. + * @function createInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateInputRequest} request CreateInputRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.CreateInputCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.createInput = function createInput(request, callback) { + return this.rpcCall(createInput, $root.google.cloud.video.livestream.v1.CreateInputRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateInput" }); + + /** + * Calls CreateInput. + * @function createInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateInputRequest} request CreateInputRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listInputs}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef ListInputsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.ListInputsResponse} [response] ListInputsResponse + */ + + /** + * Calls ListInputs. + * @function listInputs + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListInputsRequest} request ListInputsRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.ListInputsCallback} callback Node-style callback called with the error, if any, and ListInputsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.listInputs = function listInputs(request, callback) { + return this.rpcCall(listInputs, $root.google.cloud.video.livestream.v1.ListInputsRequest, $root.google.cloud.video.livestream.v1.ListInputsResponse, request, callback); + }, "name", { value: "ListInputs" }); + + /** + * Calls ListInputs. + * @function listInputs + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListInputsRequest} request ListInputsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getInput}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef GetInputCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Input} [response] Input + */ + + /** + * Calls GetInput. + * @function getInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetInputRequest} request GetInputRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.GetInputCallback} callback Node-style callback called with the error, if any, and Input + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.getInput = function getInput(request, callback) { + return this.rpcCall(getInput, $root.google.cloud.video.livestream.v1.GetInputRequest, $root.google.cloud.video.livestream.v1.Input, request, callback); + }, "name", { value: "GetInput" }); + + /** + * Calls GetInput. + * @function getInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetInputRequest} request GetInputRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteInput}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef DeleteInputCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteInput. + * @function deleteInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} request DeleteInputRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteInputCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.deleteInput = function deleteInput(request, callback) { + return this.rpcCall(deleteInput, $root.google.cloud.video.livestream.v1.DeleteInputRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteInput" }); + + /** + * Calls DeleteInput. + * @function deleteInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} request DeleteInputRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateInput}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef UpdateInputCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateInput. + * @function updateInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} request UpdateInputRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.UpdateInputCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.updateInput = function updateInput(request, callback) { + return this.rpcCall(updateInput, $root.google.cloud.video.livestream.v1.UpdateInputRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateInput" }); + + /** + * Calls UpdateInput. + * @function updateInput + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} request UpdateInputRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createEvent}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef CreateEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Event} [response] Event + */ + + /** + * Calls CreateEvent. + * @function createEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateEventRequest} request CreateEventRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.CreateEventCallback} callback Node-style callback called with the error, if any, and Event + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.createEvent = function createEvent(request, callback) { + return this.rpcCall(createEvent, $root.google.cloud.video.livestream.v1.CreateEventRequest, $root.google.cloud.video.livestream.v1.Event, request, callback); + }, "name", { value: "CreateEvent" }); + + /** + * Calls CreateEvent. + * @function createEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateEventRequest} request CreateEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listEvents}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef ListEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.ListEventsResponse} [response] ListEventsResponse + */ + + /** + * Calls ListEvents. + * @function listEvents + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListEventsRequest} request ListEventsRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.ListEventsCallback} callback Node-style callback called with the error, if any, and ListEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.listEvents = function listEvents(request, callback) { + return this.rpcCall(listEvents, $root.google.cloud.video.livestream.v1.ListEventsRequest, $root.google.cloud.video.livestream.v1.ListEventsResponse, request, callback); + }, "name", { value: "ListEvents" }); + + /** + * Calls ListEvents. + * @function listEvents + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListEventsRequest} request ListEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getEvent}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef GetEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Event} [response] Event + */ - /** - * Decodes a Playready message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Playready.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Playready(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetEvent. + * @function getEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetEventRequest} request GetEventRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.GetEventCallback} callback Node-style callback called with the error, if any, and Event + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.getEvent = function getEvent(request, callback) { + return this.rpcCall(getEvent, $root.google.cloud.video.livestream.v1.GetEventRequest, $root.google.cloud.video.livestream.v1.Event, request, callback); + }, "name", { value: "GetEvent" }); - /** - * Decodes a Playready message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Playready.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls GetEvent. + * @function getEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetEventRequest} request GetEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a Playready message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Playready.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteEvent}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef DeleteEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a Playready message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.Playready} Playready - */ - Playready.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Playready) - return object; - return new $root.google.cloud.video.livestream.v1.Encryption.Playready(); - }; + /** + * Calls DeleteEvent. + * @function deleteEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} request DeleteEventRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteEventCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.deleteEvent = function deleteEvent(request, callback) { + return this.rpcCall(deleteEvent, $root.google.cloud.video.livestream.v1.DeleteEventRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEvent" }); - /** - * Creates a plain object from a Playready message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {google.cloud.video.livestream.v1.Encryption.Playready} message Playready - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Playready.toObject = function toObject() { - return {}; - }; + /** + * Calls DeleteEvent. + * @function deleteEvent + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} request DeleteEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this Playready to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @instance - * @returns {Object.} JSON object - */ - Playready.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createAsset}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Gets the default type url for Playready - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.Playready - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Playready.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Playready"; - }; + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.video.livestream.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); - return Playready; - })(); + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - Encryption.Clearkey = (function() { + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteAsset}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Properties of a Clearkey. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IClearkey - */ + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.video.livestream.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); - /** - * Constructs a new Clearkey. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a Clearkey. - * @implements IClearkey - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IClearkey=} [properties] Properties to set - */ - function Clearkey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new Clearkey instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IClearkey=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey instance - */ - Clearkey.create = function create(properties) { - return new Clearkey(properties); - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getAsset}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Asset} [response] Asset + */ + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.video.livestream.v1.GetAssetRequest, $root.google.cloud.video.livestream.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); - /** - * Encodes the specified Clearkey message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Clearkey.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IClearkey} message Clearkey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Clearkey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Clearkey message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Clearkey.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IClearkey} message Clearkey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Clearkey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listAssets}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.ListAssetsResponse} [response] ListAssetsResponse + */ - /** - * Decodes a Clearkey message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Clearkey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Clearkey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.video.livestream.v1.ListAssetsRequest, $root.google.cloud.video.livestream.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); - /** - * Decodes a Clearkey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Clearkey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a Clearkey message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Clearkey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getPool}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef GetPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.livestream.v1.Pool} [response] Pool + */ - /** - * Creates a Clearkey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.Clearkey} Clearkey - */ - Clearkey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Clearkey) - return object; - return new $root.google.cloud.video.livestream.v1.Encryption.Clearkey(); - }; + /** + * Calls GetPool. + * @function getPool + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetPoolRequest} request GetPoolRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.GetPoolCallback} callback Node-style callback called with the error, if any, and Pool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.getPool = function getPool(request, callback) { + return this.rpcCall(getPool, $root.google.cloud.video.livestream.v1.GetPoolRequest, $root.google.cloud.video.livestream.v1.Pool, request, callback); + }, "name", { value: "GetPool" }); - /** - * Creates a plain object from a Clearkey message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {google.cloud.video.livestream.v1.Encryption.Clearkey} message Clearkey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Clearkey.toObject = function toObject() { - return {}; - }; + /** + * Calls GetPool. + * @function getPool + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IGetPoolRequest} request GetPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this Clearkey to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @instance - * @returns {Object.} JSON object - */ - Clearkey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updatePool}. + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @typedef UpdatePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Gets the default type url for Clearkey - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.Clearkey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Clearkey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Clearkey"; - }; + /** + * Calls UpdatePool. + * @function updatePool + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest} request UpdatePoolRequest message or plain object + * @param {google.cloud.video.livestream.v1.LivestreamService.UpdatePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LivestreamService.prototype.updatePool = function updatePool(request, callback) { + return this.rpcCall(updatePool, $root.google.cloud.video.livestream.v1.UpdatePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdatePool" }); - return Clearkey; - })(); + /** + * Calls UpdatePool. + * @function updatePool + * @memberof google.cloud.video.livestream.v1.LivestreamService + * @instance + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest} request UpdatePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - Encryption.DrmSystems = (function() { + return LivestreamService; + })(); - /** - * Properties of a DrmSystems. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IDrmSystems - * @property {google.cloud.video.livestream.v1.Encryption.IWidevine|null} [widevine] DrmSystems widevine - * @property {google.cloud.video.livestream.v1.Encryption.IFairplay|null} [fairplay] DrmSystems fairplay - * @property {google.cloud.video.livestream.v1.Encryption.IPlayready|null} [playready] DrmSystems playready - * @property {google.cloud.video.livestream.v1.Encryption.IClearkey|null} [clearkey] DrmSystems clearkey - */ + v1.CreateAssetRequest = (function() { - /** - * Constructs a new DrmSystems. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a DrmSystems. - * @implements IDrmSystems - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems=} [properties] Properties to set - */ - function DrmSystems(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a CreateAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {google.cloud.video.livestream.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {string|null} [requestId] CreateAssetRequest requestId + */ - /** - * DrmSystems widevine. - * @member {google.cloud.video.livestream.v1.Encryption.IWidevine|null|undefined} widevine - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @instance - */ - DrmSystems.prototype.widevine = null; + /** + * Constructs a new CreateAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest + * @constructor + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest=} [properties] Properties to set + */ + function CreateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DrmSystems fairplay. - * @member {google.cloud.video.livestream.v1.Encryption.IFairplay|null|undefined} fairplay - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @instance - */ - DrmSystems.prototype.fairplay = null; + /** + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.parent = ""; - /** - * DrmSystems playready. - * @member {google.cloud.video.livestream.v1.Encryption.IPlayready|null|undefined} playready - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @instance - */ - DrmSystems.prototype.playready = null; + /** + * CreateAssetRequest asset. + * @member {google.cloud.video.livestream.v1.IAsset|null|undefined} asset + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; - /** - * DrmSystems clearkey. - * @member {google.cloud.video.livestream.v1.Encryption.IClearkey|null|undefined} clearkey - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @instance - */ - DrmSystems.prototype.clearkey = null; + /** + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.assetId = ""; - /** - * Creates a new DrmSystems instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems instance - */ - DrmSystems.create = function create(properties) { - return new DrmSystems(properties); - }; + /** + * CreateAssetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.requestId = ""; - /** - * Encodes the specified DrmSystems message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.DrmSystems.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems} message DrmSystems message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DrmSystems.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.widevine != null && Object.hasOwnProperty.call(message, "widevine")) - $root.google.cloud.video.livestream.v1.Encryption.Widevine.encode(message.widevine, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fairplay != null && Object.hasOwnProperty.call(message, "fairplay")) - $root.google.cloud.video.livestream.v1.Encryption.Fairplay.encode(message.fairplay, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.playready != null && Object.hasOwnProperty.call(message, "playready")) - $root.google.cloud.video.livestream.v1.Encryption.Playready.encode(message.playready, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.clearkey != null && Object.hasOwnProperty.call(message, "clearkey")) - $root.google.cloud.video.livestream.v1.Encryption.Clearkey.encode(message.clearkey, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.CreateAssetRequest} CreateAssetRequest instance + */ + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); + }; - /** - * Encodes the specified DrmSystems message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.DrmSystems.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IDrmSystems} message DrmSystems message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DrmSystems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.video.livestream.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; - /** - * Decodes a DrmSystems message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DrmSystems.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.DrmSystems(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.decode(reader, reader.uint32()); - break; - } - case 2: { - message.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.decode(reader, reader.uint32()); - break; - } - case 3: { - message.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.decode(reader, reader.uint32()); - break; - } - case 4: { - message.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.asset = $root.google.cloud.video.livestream.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 3: { + message.assetId = reader.string(); + break; + } + case 4: { + message.requestId = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DrmSystems message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DrmSystems.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a DrmSystems message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DrmSystems.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.widevine != null && message.hasOwnProperty("widevine")) { - var error = $root.google.cloud.video.livestream.v1.Encryption.Widevine.verify(message.widevine); - if (error) - return "widevine." + error; - } - if (message.fairplay != null && message.hasOwnProperty("fairplay")) { - var error = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.verify(message.fairplay); - if (error) - return "fairplay." + error; - } - if (message.playready != null && message.hasOwnProperty("playready")) { - var error = $root.google.cloud.video.livestream.v1.Encryption.Playready.verify(message.playready); - if (error) - return "playready." + error; - } - if (message.clearkey != null && message.hasOwnProperty("clearkey")) { - var error = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.verify(message.clearkey); - if (error) - return "clearkey." + error; - } - return null; - }; + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DrmSystems message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.DrmSystems} DrmSystems - */ - DrmSystems.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.DrmSystems) - return object; - var message = new $root.google.cloud.video.livestream.v1.Encryption.DrmSystems(); - if (object.widevine != null) { - if (typeof object.widevine !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.widevine: object expected"); - message.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.fromObject(object.widevine); - } - if (object.fairplay != null) { - if (typeof object.fairplay !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.fairplay: object expected"); - message.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.fromObject(object.fairplay); - } - if (object.playready != null) { - if (typeof object.playready !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.playready: object expected"); - message.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.fromObject(object.playready); - } - if (object.clearkey != null) { - if (typeof object.clearkey !== "object") - throw TypeError(".google.cloud.video.livestream.v1.Encryption.DrmSystems.clearkey: object expected"); - message.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.fromObject(object.clearkey); - } - return message; - }; + /** + * Verifies a CreateAssetRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.video.livestream.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; - /** - * Creates a plain object from a DrmSystems message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {google.cloud.video.livestream.v1.Encryption.DrmSystems} message DrmSystems - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DrmSystems.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.widevine = null; - object.fairplay = null; - object.playready = null; - object.clearkey = null; - } - if (message.widevine != null && message.hasOwnProperty("widevine")) - object.widevine = $root.google.cloud.video.livestream.v1.Encryption.Widevine.toObject(message.widevine, options); - if (message.fairplay != null && message.hasOwnProperty("fairplay")) - object.fairplay = $root.google.cloud.video.livestream.v1.Encryption.Fairplay.toObject(message.fairplay, options); - if (message.playready != null && message.hasOwnProperty("playready")) - object.playready = $root.google.cloud.video.livestream.v1.Encryption.Playready.toObject(message.playready, options); - if (message.clearkey != null && message.hasOwnProperty("clearkey")) - object.clearkey = $root.google.cloud.video.livestream.v1.Encryption.Clearkey.toObject(message.clearkey, options); + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.CreateAssetRequest} CreateAssetRequest + */ + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.CreateAssetRequest) return object; - }; + var message = new $root.google.cloud.video.livestream.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.video.livestream.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.video.livestream.v1.Asset.fromObject(object.asset); + } + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; - /** - * Converts this DrmSystems to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @instance - * @returns {Object.} JSON object - */ - DrmSystems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.CreateAssetRequest} message CreateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.asset = null; + object.assetId = ""; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.video.livestream.v1.Asset.toObject(message.asset, options); + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; - /** - * Gets the default type url for DrmSystems - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.DrmSystems - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DrmSystems.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.DrmSystems"; - }; + /** + * Converts this CreateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DrmSystems; - })(); + /** + * Gets the default type url for CreateAssetRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.CreateAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateAssetRequest"; + }; - Encryption.Aes128Encryption = (function() { + return CreateAssetRequest; + })(); - /** - * Properties of an Aes128Encryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IAes128Encryption - */ + v1.DeleteAssetRequest = (function() { - /** - * Constructs a new Aes128Encryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents an Aes128Encryption. - * @implements IAes128Encryption - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption=} [properties] Properties to set - */ - function Aes128Encryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DeleteAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name + * @property {string|null} [requestId] DeleteAssetRequest requestId + */ - /** - * Creates a new Aes128Encryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption instance - */ - Aes128Encryption.create = function create(properties) { - return new Aes128Encryption(properties); - }; + /** + * Constructs a new DeleteAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest + * @constructor + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest=} [properties] Properties to set + */ + function DeleteAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * DeleteAssetRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @instance + */ + DeleteAssetRequest.prototype.name = ""; - /** - * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeleteAssetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @instance + */ + DeleteAssetRequest.prototype.requestId = ""; - /** - * Decodes an Aes128Encryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.DeleteAssetRequest} DeleteAssetRequest instance + */ + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); + }; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Aes128Encryption message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aes128Encryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} Aes128Encryption - */ - Aes128Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption) - return object; - return new $root.google.cloud.video.livestream.v1.Encryption.Aes128Encryption(); - }; - - /** - * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.Aes128Encryption} message Aes128Encryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Aes128Encryption.toObject = function toObject() { - return {}; - }; + } + return message; + }; - /** - * Converts this Aes128Encryption to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @instance - * @returns {Object.} JSON object - */ - Aes128Encryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Aes128Encryption - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.Aes128Encryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Aes128Encryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.Aes128Encryption"; - }; + /** + * Verifies a DeleteAssetRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; - return Aes128Encryption; - })(); + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.DeleteAssetRequest} DeleteAssetRequest + */ + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.DeleteAssetRequest) + return object; + var message = new $root.google.cloud.video.livestream.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; - Encryption.SampleAesEncryption = (function() { + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; - /** - * Properties of a SampleAesEncryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface ISampleAesEncryption - */ + /** + * Converts this DeleteAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new SampleAesEncryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a SampleAesEncryption. - * @implements ISampleAesEncryption - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set - */ - function SampleAesEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for DeleteAssetRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.DeleteAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteAssetRequest"; + }; - /** - * Creates a new SampleAesEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption instance - */ - SampleAesEncryption.create = function create(properties) { - return new SampleAesEncryption(properties); - }; + return DeleteAssetRequest; + })(); - /** - * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + v1.ListAssetsRequest = (function() { - /** - * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListAssetsRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + */ - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.video.livestream.v1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.parent = ""; - /** - * Verifies a SampleAesEncryption message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SampleAesEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; - /** - * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} SampleAesEncryption - */ - SampleAesEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption) - return object; - return new $root.google.cloud.video.livestream.v1.Encryption.SampleAesEncryption(); - }; + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; - /** - * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.SampleAesEncryption} message SampleAesEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SampleAesEncryption.toObject = function toObject() { - return {}; - }; + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; - /** - * Converts this SampleAesEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @instance - * @returns {Object.} JSON object - */ - SampleAesEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; - /** - * Gets the default type url for SampleAesEncryption - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SampleAesEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListAssetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.SampleAesEncryption"; - }; + } + return message; + }; - return SampleAesEncryption; - })(); + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Encryption.MpegCommonEncryption = (function() { + /** + * Verifies a ListAssetsRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.ListAssetsRequest} ListAssetsRequest + */ + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListAssetsRequest) + return object; + var message = new $root.google.cloud.video.livestream.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {google.cloud.video.livestream.v1.ListAssetsRequest} message ListAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; - /** - * Properties of a MpegCommonEncryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @interface IMpegCommonEncryption - * @property {string|null} [scheme] MpegCommonEncryption scheme - */ + /** + * Converts this ListAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new MpegCommonEncryption. - * @memberof google.cloud.video.livestream.v1.Encryption - * @classdesc Represents a MpegCommonEncryption. - * @implements IMpegCommonEncryption - * @constructor - * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - */ - function MpegCommonEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ListAssetsRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.ListAssetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListAssetsRequest"; + }; - /** - * MpegCommonEncryption scheme. - * @member {string} scheme - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @instance - */ - MpegCommonEncryption.prototype.scheme = ""; - - /** - * Creates a new MpegCommonEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance - */ - MpegCommonEncryption.create = function create(properties) { - return new MpegCommonEncryption(properties); - }; + return ListAssetsRequest; + })(); - /** - * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.scheme); - return writer; - }; + v1.ListAssetsResponse = (function() { - /** - * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListAssetsResponse. + * @memberof google.cloud.video.livestream.v1 + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @property {Array.|null} [unreachable] ListAssetsResponse unreachable + */ - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scheme = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new ListAssetsResponse. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse + * @constructor + * @param {google.cloud.video.livestream.v1.IListAssetsResponse=} [properties] Properties to set + */ + function ListAssetsResponse(properties) { + this.assets = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.assets = $util.emptyArray; - /** - * Verifies a MpegCommonEncryption message. - * @function verify - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MpegCommonEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheme != null && message.hasOwnProperty("scheme")) - if (!$util.isString(message.scheme)) - return "scheme: string expected"; - return null; - }; + /** + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.nextPageToken = ""; - /** - * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - */ - MpegCommonEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption) - return object; - var message = new $root.google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption(); - if (object.scheme != null) - message.scheme = String(object.scheme); - return message; - }; + /** + * ListAssetsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.unreachable = $util.emptyArray; - /** - * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption} message MpegCommonEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MpegCommonEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scheme = ""; - if (message.scheme != null && message.hasOwnProperty("scheme")) - object.scheme = message.scheme; - return object; - }; + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListAssetsResponse} ListAssetsResponse instance + */ + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); + }; - /** - * Converts this MpegCommonEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @instance - * @returns {Object.} JSON object - */ - MpegCommonEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.video.livestream.v1.Asset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; - /** - * Gets the default type url for MpegCommonEncryption - * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MpegCommonEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListAssetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {google.cloud.video.livestream.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListAssetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.video.livestream.v1.Asset.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption"; - }; + } + return message; + }; - return MpegCommonEncryption; - })(); + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return Encryption; - })(); + /** + * Verifies a ListAssetsResponse message. + * @function verify + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.video.livestream.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; - v1.LivestreamService = (function() { + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.ListAssetsResponse} ListAssetsResponse + */ + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListAssetsResponse) + return object; + var message = new $root.google.cloud.video.livestream.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.video.livestream.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.video.livestream.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.video.livestream.v1.Asset.fromObject(object.assets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.livestream.v1.ListAssetsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; /** - * Constructs a new LivestreamService service. - * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a LivestreamService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @static + * @param {google.cloud.video.livestream.v1.ListAssetsResponse} message ListAssetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - function LivestreamService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + ListAssetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.assets = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.video.livestream.v1.Asset.toObject(message.assets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; - (LivestreamService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LivestreamService; + /** + * Converts this ListAssetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates new LivestreamService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.video.livestream.v1.LivestreamService + * Gets the default type url for ListAssetsResponse + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.ListAssetsResponse * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LivestreamService} RPC service. Useful where requests and/or responses are streamed. + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - LivestreamService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListAssetsResponse"; }; + return ListAssetsResponse; + })(); + + v1.GetAssetRequest = (function() { + /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef CreateChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a GetAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name */ /** - * Calls CreateChannel. - * @function createChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.CreateChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new GetAssetRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest + * @constructor + * @param {google.cloud.video.livestream.v1.IGetAssetRequest=} [properties] Properties to set */ - Object.defineProperty(LivestreamService.prototype.createChannel = function createChannel(request, callback) { - return this.rpcCall(createChannel, $root.google.cloud.video.livestream.v1.CreateChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateChannel" }); + function GetAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateChannel. - * @function createChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.GetAssetRequest * @instance - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetAssetRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listChannels}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef ListChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.ListChannelsResponse} [response] ListChannelsResponse + * Creates a new GetAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.GetAssetRequest} GetAssetRequest instance */ + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); + }; /** - * Calls ListChannels. - * @function listChannels - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListChannelsRequest} request ListChannelsRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.ListChannelsCallback} callback Node-style callback called with the error, if any, and ListChannelsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LivestreamService.prototype.listChannels = function listChannels(request, callback) { - return this.rpcCall(listChannels, $root.google.cloud.video.livestream.v1.ListChannelsRequest, $root.google.cloud.video.livestream.v1.ListChannelsResponse, request, callback); - }, "name", { value: "ListChannels" }); + GetAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListChannels. - * @function listChannels - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListChannelsRequest} request ListChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef GetChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.Channel} [response] Channel + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetChannel. - * @function getChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IGetChannelRequest} request GetChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.GetChannelCallback} callback Node-style callback called with the error, if any, and Channel - * @returns {undefined} - * @variation 1 + * Verifies a GetAssetRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(LivestreamService.prototype.getChannel = function getChannel(request, callback) { - return this.rpcCall(getChannel, $root.google.cloud.video.livestream.v1.GetChannelRequest, $root.google.cloud.video.livestream.v1.Channel, request, callback); - }, "name", { value: "GetChannel" }); + GetAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls GetChannel. - * @function getChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IGetChannelRequest} request GetChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.GetAssetRequest} GetAssetRequest */ + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.GetAssetRequest) + return object; + var message = new $root.google.cloud.video.livestream.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef DeleteChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {google.cloud.video.livestream.v1.GetAssetRequest} message GetAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls DeleteChannel. - * @function deleteChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * Converts this GetAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.GetAssetRequest * @instance - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(LivestreamService.prototype.deleteChannel = function deleteChannel(request, callback) { - return this.rpcCall(deleteChannel, $root.google.cloud.video.livestream.v1.DeleteChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteChannel" }); + GetAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteChannel. - * @function deleteChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetAssetRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.GetAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetAssetRequest"; + }; - /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef UpdateChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + return GetAssetRequest; + })(); - /** - * Calls UpdateChannel. - * @function updateChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.UpdateChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LivestreamService.prototype.updateChannel = function updateChannel(request, callback) { - return this.rpcCall(updateChannel, $root.google.cloud.video.livestream.v1.UpdateChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateChannel" }); + v1.CreateChannelRequest = (function() { /** - * Calls UpdateChannel. - * @function updateChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a CreateChannelRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface ICreateChannelRequest + * @property {string|null} [parent] CreateChannelRequest parent + * @property {google.cloud.video.livestream.v1.IChannel|null} [channel] CreateChannelRequest channel + * @property {string|null} [channelId] CreateChannelRequest channelId + * @property {string|null} [requestId] CreateChannelRequest requestId */ /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|startChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef StartChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new CreateChannelRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a CreateChannelRequest. + * @implements ICreateChannelRequest + * @constructor + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest=} [properties] Properties to set */ + function CreateChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls StartChannel. - * @function startChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * CreateChannelRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest * @instance - * @param {google.cloud.video.livestream.v1.IStartChannelRequest} request StartChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.StartChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LivestreamService.prototype.startChannel = function startChannel(request, callback) { - return this.rpcCall(startChannel, $root.google.cloud.video.livestream.v1.StartChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "StartChannel" }); + CreateChannelRequest.prototype.parent = ""; /** - * Calls StartChannel. - * @function startChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * CreateChannelRequest channel. + * @member {google.cloud.video.livestream.v1.IChannel|null|undefined} channel + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest * @instance - * @param {google.cloud.video.livestream.v1.IStartChannelRequest} request StartChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|stopChannel}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef StopChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + CreateChannelRequest.prototype.channel = null; /** - * Calls StopChannel. - * @function stopChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * CreateChannelRequest channelId. + * @member {string} channelId + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest * @instance - * @param {google.cloud.video.livestream.v1.IStopChannelRequest} request StopChannelRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.StopChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LivestreamService.prototype.stopChannel = function stopChannel(request, callback) { - return this.rpcCall(stopChannel, $root.google.cloud.video.livestream.v1.StopChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "StopChannel" }); + CreateChannelRequest.prototype.channelId = ""; /** - * Calls StopChannel. - * @function stopChannel - * @memberof google.cloud.video.livestream.v1.LivestreamService + * CreateChannelRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest * @instance - * @param {google.cloud.video.livestream.v1.IStopChannelRequest} request StopChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateChannelRequest.prototype.requestId = ""; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createInput}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef CreateInputCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new CreateChannelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest instance */ + CreateChannelRequest.create = function create(properties) { + return new CreateChannelRequest(properties); + }; /** - * Calls CreateInput. - * @function createInput - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.ICreateInputRequest} request CreateInputRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.CreateInputCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LivestreamService.prototype.createInput = function createInput(request, callback) { - return this.rpcCall(createInput, $root.google.cloud.video.livestream.v1.CreateInputRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateInput" }); + CreateChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.google.cloud.video.livestream.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; /** - * Calls CreateInput. - * @function createInput - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.ICreateInputRequest} request CreateInputRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listInputs}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef ListInputsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.ListInputsResponse} [response] ListInputsResponse + * Decodes a CreateChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.channel = $root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32()); + break; + } + case 3: { + message.channelId = reader.string(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListInputs. - * @function listInputs - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListInputsRequest} request ListInputsRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.ListInputsCallback} callback Node-style callback called with the error, if any, and ListInputsResponse - * @returns {undefined} - * @variation 1 + * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(LivestreamService.prototype.listInputs = function listInputs(request, callback) { - return this.rpcCall(listInputs, $root.google.cloud.video.livestream.v1.ListInputsRequest, $root.google.cloud.video.livestream.v1.ListInputsResponse, request, callback); - }, "name", { value: "ListInputs" }); + CreateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListInputs. - * @function listInputs - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListInputsRequest} request ListInputsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a CreateChannelRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CreateChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getInput}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef GetInputCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.Input} [response] Input + * Creates a CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest */ + CreateChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.CreateChannelRequest) + return object; + var message = new $root.google.cloud.video.livestream.v1.CreateChannelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".google.cloud.video.livestream.v1.CreateChannelRequest.channel: object expected"); + message.channel = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channel); + } + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; /** - * Calls GetInput. - * @function getInput - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IGetInputRequest} request GetInputRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.GetInputCallback} callback Node-style callback called with the error, if any, and Input - * @returns {undefined} - * @variation 1 + * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {google.cloud.video.livestream.v1.CreateChannelRequest} message CreateChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(LivestreamService.prototype.getInput = function getInput(request, callback) { - return this.rpcCall(getInput, $root.google.cloud.video.livestream.v1.GetInputRequest, $root.google.cloud.video.livestream.v1.Input, request, callback); - }, "name", { value: "GetInput" }); + CreateChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.channel = null; + object.channelId = ""; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channel, options); + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; /** - * Calls GetInput. - * @function getInput - * @memberof google.cloud.video.livestream.v1.LivestreamService + * Converts this CreateChannelRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest * @instance - * @param {google.cloud.video.livestream.v1.IGetInputRequest} request GetInputRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CreateChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteInput}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef DeleteInputCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for CreateChannelRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CreateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateChannelRequest"; + }; + + return CreateChannelRequest; + })(); + + v1.ListChannelsRequest = (function() { /** - * Calls DeleteInput. - * @function deleteInput - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} request DeleteInputRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteInputCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Properties of a ListChannelsRequest. + * @memberof google.cloud.video.livestream.v1 + * @interface IListChannelsRequest + * @property {string|null} [parent] ListChannelsRequest parent + * @property {number|null} [pageSize] ListChannelsRequest pageSize + * @property {string|null} [pageToken] ListChannelsRequest pageToken + * @property {string|null} [filter] ListChannelsRequest filter + * @property {string|null} [orderBy] ListChannelsRequest orderBy */ - Object.defineProperty(LivestreamService.prototype.deleteInput = function deleteInput(request, callback) { - return this.rpcCall(deleteInput, $root.google.cloud.video.livestream.v1.DeleteInputRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteInput" }); /** - * Calls DeleteInput. - * @function deleteInput - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} request DeleteInputRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListChannelsRequest. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents a ListChannelsRequest. + * @implements IListChannelsRequest + * @constructor + * @param {google.cloud.video.livestream.v1.IListChannelsRequest=} [properties] Properties to set */ + function ListChannelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|updateInput}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef UpdateInputCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListChannelsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @instance */ + ListChannelsRequest.prototype.parent = ""; /** - * Calls UpdateInput. - * @function updateInput - * @memberof google.cloud.video.livestream.v1.LivestreamService + * ListChannelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest * @instance - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} request UpdateInputRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.UpdateInputCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LivestreamService.prototype.updateInput = function updateInput(request, callback) { - return this.rpcCall(updateInput, $root.google.cloud.video.livestream.v1.UpdateInputRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateInput" }); + ListChannelsRequest.prototype.pageSize = 0; /** - * Calls UpdateInput. - * @function updateInput - * @memberof google.cloud.video.livestream.v1.LivestreamService + * ListChannelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest * @instance - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} request UpdateInputRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListChannelsRequest.prototype.pageToken = ""; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|createEvent}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef CreateEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.Event} [response] Event + * ListChannelsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @instance */ + ListChannelsRequest.prototype.filter = ""; /** - * Calls CreateEvent. - * @function createEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService + * ListChannelsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest * @instance - * @param {google.cloud.video.livestream.v1.ICreateEventRequest} request CreateEventRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.CreateEventCallback} callback Node-style callback called with the error, if any, and Event - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LivestreamService.prototype.createEvent = function createEvent(request, callback) { - return this.rpcCall(createEvent, $root.google.cloud.video.livestream.v1.CreateEventRequest, $root.google.cloud.video.livestream.v1.Event, request, callback); - }, "name", { value: "CreateEvent" }); + ListChannelsRequest.prototype.orderBy = ""; /** - * Calls CreateEvent. - * @function createEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.ICreateEventRequest} request CreateEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListChannelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListChannelsRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest instance */ + ListChannelsRequest.create = function create(properties) { + return new ListChannelsRequest(properties); + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|listEvents}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef ListEventsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.ListEventsResponse} [response] ListEventsResponse + * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListChannelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Calls ListEvents. - * @function listEvents - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListEventsRequest} request ListEventsRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.ListEventsCallback} callback Node-style callback called with the error, if any, and ListEventsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {google.cloud.video.livestream.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(LivestreamService.prototype.listEvents = function listEvents(request, callback) { - return this.rpcCall(listEvents, $root.google.cloud.video.livestream.v1.ListEventsRequest, $root.google.cloud.video.livestream.v1.ListEventsResponse, request, callback); - }, "name", { value: "ListEvents" }); + ListChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListEvents. - * @function listEvents - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IListEventsRequest} request ListEventsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListChannelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListChannelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListChannelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|getEvent}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef GetEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.livestream.v1.Event} [response] Event + * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetEvent. - * @function getEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IGetEventRequest} request GetEventRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.GetEventCallback} callback Node-style callback called with the error, if any, and Event - * @returns {undefined} - * @variation 1 + * Verifies a ListChannelsRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(LivestreamService.prototype.getEvent = function getEvent(request, callback) { - return this.rpcCall(getEvent, $root.google.cloud.video.livestream.v1.GetEventRequest, $root.google.cloud.video.livestream.v1.Event, request, callback); - }, "name", { value: "GetEvent" }); + ListChannelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Calls GetEvent. - * @function getEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IGetEventRequest} request GetEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest */ + ListChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListChannelsRequest) + return object; + var message = new $root.google.cloud.video.livestream.v1.ListChannelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; /** - * Callback as used by {@link google.cloud.video.livestream.v1.LivestreamService|deleteEvent}. - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @typedef DeleteEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {google.cloud.video.livestream.v1.ListChannelsRequest} message ListChannelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListChannelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; /** - * Calls DeleteEvent. - * @function deleteEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService + * Converts this ListChannelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest * @instance - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} request DeleteEventRequest message or plain object - * @param {google.cloud.video.livestream.v1.LivestreamService.DeleteEventCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(LivestreamService.prototype.deleteEvent = function deleteEvent(request, callback) { - return this.rpcCall(deleteEvent, $root.google.cloud.video.livestream.v1.DeleteEventRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEvent" }); + ListChannelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteEvent. - * @function deleteEvent - * @memberof google.cloud.video.livestream.v1.LivestreamService - * @instance - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} request DeleteEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for ListChannelsRequest + * @function getTypeUrl + * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListChannelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListChannelsRequest"; + }; - return LivestreamService; + return ListChannelsRequest; })(); - v1.CreateChannelRequest = (function() { + v1.ListChannelsResponse = (function() { /** - * Properties of a CreateChannelRequest. + * Properties of a ListChannelsResponse. * @memberof google.cloud.video.livestream.v1 - * @interface ICreateChannelRequest - * @property {string|null} [parent] CreateChannelRequest parent - * @property {google.cloud.video.livestream.v1.IChannel|null} [channel] CreateChannelRequest channel - * @property {string|null} [channelId] CreateChannelRequest channelId - * @property {string|null} [requestId] CreateChannelRequest requestId + * @interface IListChannelsResponse + * @property {Array.|null} [channels] ListChannelsResponse channels + * @property {string|null} [nextPageToken] ListChannelsResponse nextPageToken + * @property {Array.|null} [unreachable] ListChannelsResponse unreachable */ /** - * Constructs a new CreateChannelRequest. + * Constructs a new ListChannelsResponse. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a CreateChannelRequest. - * @implements ICreateChannelRequest + * @classdesc Represents a ListChannelsResponse. + * @implements IListChannelsResponse * @constructor - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IListChannelsResponse=} [properties] Properties to set */ - function CreateChannelRequest(properties) { + function ListChannelsResponse(properties) { + this.channels = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13167,117 +16985,109 @@ } /** - * CreateChannelRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest - * @instance - */ - CreateChannelRequest.prototype.parent = ""; - - /** - * CreateChannelRequest channel. - * @member {google.cloud.video.livestream.v1.IChannel|null|undefined} channel - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * ListChannelsResponse channels. + * @member {Array.} channels + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @instance */ - CreateChannelRequest.prototype.channel = null; + ListChannelsResponse.prototype.channels = $util.emptyArray; /** - * CreateChannelRequest channelId. - * @member {string} channelId - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * ListChannelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @instance */ - CreateChannelRequest.prototype.channelId = ""; + ListChannelsResponse.prototype.nextPageToken = ""; /** - * CreateChannelRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * ListChannelsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @instance */ - CreateChannelRequest.prototype.requestId = ""; + ListChannelsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new CreateChannelRequest instance using the specified properties. + * Creates a new ListChannelsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest instance + * @param {google.cloud.video.livestream.v1.IListChannelsResponse=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse instance */ - CreateChannelRequest.create = function create(properties) { - return new CreateChannelRequest(properties); + ListChannelsResponse.create = function create(properties) { + return new ListChannelsResponse(properties); }; /** - * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateChannelRequest.verify|verify} messages. + * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelRequest.encode = function encode(message, writer) { + ListChannelsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.google.cloud.video.livestream.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.channels != null && message.channels.length) + for (var i = 0; i < message.channels.length; ++i) + $root.google.cloud.video.livestream.v1.Channel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateChannelRequest.verify|verify} messages. + * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer. + * Decodes a ListChannelsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelRequest.decode = function decode(reader, length) { + ListChannelsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListChannelsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32())); break; } case 2: { - message.channel = $root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.channelId = reader.string(); - break; - } - case 4: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -13289,156 +17099,169 @@ }; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListChannelsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateChannelRequest message. + * Verifies a ListChannelsResponse message. * @function verify - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateChannelRequest.verify = function verify(message) { + ListChannelsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (var i = 0; i < message.channels.length; ++i) { + var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChannelsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse */ - CreateChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.CreateChannelRequest) + ListChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListChannelsResponse) return object; - var message = new $root.google.cloud.video.livestream.v1.CreateChannelRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".google.cloud.video.livestream.v1.CreateChannelRequest.channel: object expected"); - message.channel = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channel); + var message = new $root.google.cloud.video.livestream.v1.ListChannelsResponse(); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.channels: array expected"); + message.channels = []; + for (var i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.channels: object expected"); + message.channels[i] = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static - * @param {google.cloud.video.livestream.v1.CreateChannelRequest} message CreateChannelRequest + * @param {google.cloud.video.livestream.v1.ListChannelsResponse} message ListChannelsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateChannelRequest.toObject = function toObject(message, options) { + ListChannelsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.channel = null; - object.channelId = ""; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.channels = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.channels && message.channels.length) { + object.channels = []; + for (var j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channel, options); - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this CreateChannelRequest to JSON. + * Converts this ListChannelsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @instance * @returns {Object.} JSON object */ - CreateChannelRequest.prototype.toJSON = function toJSON() { + ListChannelsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateChannelRequest + * Gets the default type url for ListChannelsResponse * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.CreateChannelRequest + * @memberof google.cloud.video.livestream.v1.ListChannelsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChannelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListChannelsResponse"; }; - return CreateChannelRequest; + return ListChannelsResponse; })(); - v1.ListChannelsRequest = (function() { + v1.GetChannelRequest = (function() { /** - * Properties of a ListChannelsRequest. + * Properties of a GetChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListChannelsRequest - * @property {string|null} [parent] ListChannelsRequest parent - * @property {number|null} [pageSize] ListChannelsRequest pageSize - * @property {string|null} [pageToken] ListChannelsRequest pageToken - * @property {string|null} [filter] ListChannelsRequest filter - * @property {string|null} [orderBy] ListChannelsRequest orderBy + * @interface IGetChannelRequest + * @property {string|null} [name] GetChannelRequest name */ /** - * Constructs a new ListChannelsRequest. + * Constructs a new GetChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListChannelsRequest. - * @implements IListChannelsRequest + * @classdesc Represents a GetChannelRequest. + * @implements IGetChannelRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListChannelsRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IGetChannelRequest=} [properties] Properties to set */ - function ListChannelsRequest(properties) { + function GetChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13446,131 +17269,75 @@ } /** - * ListChannelsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest - * @instance - */ - ListChannelsRequest.prototype.parent = ""; - - /** - * ListChannelsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest - * @instance - */ - ListChannelsRequest.prototype.pageSize = 0; - - /** - * ListChannelsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest - * @instance - */ - ListChannelsRequest.prototype.pageToken = ""; - - /** - * ListChannelsRequest filter. - * @member {string} filter - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest - * @instance - */ - ListChannelsRequest.prototype.filter = ""; - - /** - * ListChannelsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * GetChannelRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @instance */ - ListChannelsRequest.prototype.orderBy = ""; + GetChannelRequest.prototype.name = ""; /** - * Creates a new ListChannelsRequest instance using the specified properties. + * Creates a new GetChannelRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest instance + * @param {google.cloud.video.livestream.v1.IGetChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest instance */ - ListChannelsRequest.create = function create(properties) { - return new ListChannelsRequest(properties); + GetChannelRequest.create = function create(properties) { + return new GetChannelRequest(properties); }; /** - * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsRequest.verify|verify} messages. + * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetChannelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsRequest.encode = function encode(message, writer) { + GetChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsRequest.verify|verify} messages. + * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer. + * Decodes a GetChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsRequest.decode = function decode(reader, length) { + GetChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListChannelsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -13582,159 +17349,124 @@ }; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + GetChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelsRequest message. + * Verifies a GetChannelRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelsRequest.verify = function verify(message) { + GetChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest */ - ListChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListChannelsRequest) + GetChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.GetChannelRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListChannelsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.video.livestream.v1.GetChannelRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static - * @param {google.cloud.video.livestream.v1.ListChannelsRequest} message ListChannelsRequest + * @param {google.cloud.video.livestream.v1.GetChannelRequest} message GetChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelsRequest.toObject = function toObject(message, options) { + GetChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListChannelsRequest to JSON. + * Converts this GetChannelRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @instance * @returns {Object.} JSON object */ - ListChannelsRequest.prototype.toJSON = function toJSON() { + GetChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelsRequest + * Gets the default type url for GetChannelRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListChannelsRequest + * @memberof google.cloud.video.livestream.v1.GetChannelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListChannelsRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetChannelRequest"; }; - return ListChannelsRequest; + return GetChannelRequest; })(); - v1.ListChannelsResponse = (function() { + v1.DeleteChannelRequest = (function() { /** - * Properties of a ListChannelsResponse. + * Properties of a DeleteChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListChannelsResponse - * @property {Array.|null} [channels] ListChannelsResponse channels - * @property {string|null} [nextPageToken] ListChannelsResponse nextPageToken - * @property {Array.|null} [unreachable] ListChannelsResponse unreachable + * @interface IDeleteChannelRequest + * @property {string|null} [name] DeleteChannelRequest name + * @property {string|null} [requestId] DeleteChannelRequest requestId + * @property {boolean|null} [force] DeleteChannelRequest force */ /** - * Constructs a new ListChannelsResponse. + * Constructs a new DeleteChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListChannelsResponse. - * @implements IListChannelsResponse + * @classdesc Represents a DeleteChannelRequest. + * @implements IDeleteChannelRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListChannelsResponse=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest=} [properties] Properties to set */ - function ListChannelsResponse(properties) { - this.channels = []; - this.unreachable = []; + function DeleteChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13742,109 +17474,103 @@ } /** - * ListChannelsResponse channels. - * @member {Array.} channels - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * DeleteChannelRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @instance */ - ListChannelsResponse.prototype.channels = $util.emptyArray; + DeleteChannelRequest.prototype.name = ""; /** - * ListChannelsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * DeleteChannelRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @instance */ - ListChannelsResponse.prototype.nextPageToken = ""; + DeleteChannelRequest.prototype.requestId = ""; /** - * ListChannelsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * DeleteChannelRequest force. + * @member {boolean} force + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @instance */ - ListChannelsResponse.prototype.unreachable = $util.emptyArray; + DeleteChannelRequest.prototype.force = false; /** - * Creates a new ListChannelsResponse instance using the specified properties. + * Creates a new DeleteChannelRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsResponse=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse instance + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest instance */ - ListChannelsResponse.create = function create(properties) { - return new ListChannelsResponse(properties); + DeleteChannelRequest.create = function create(properties) { + return new DeleteChannelRequest(properties); }; /** - * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsResponse.verify|verify} messages. + * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteChannelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsResponse.encode = function encode(message, writer) { + DeleteChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.google.cloud.video.livestream.v1.Channel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListChannelsResponse.verify|verify} messages. + * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer. + * Decodes a DeleteChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsResponse.decode = function decode(reader, length) { + DeleteChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListChannelsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.requestId = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.force = reader.bool(); break; } default: @@ -13856,169 +17582,141 @@ }; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelsResponse message. + * Verifies a DeleteChannelRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelsResponse.verify = function verify(message) { + DeleteChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ListChannelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest */ - ListChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListChannelsResponse) + DeleteChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.DeleteChannelRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.channels: object expected"); - message.channels[i] = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channels[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.video.livestream.v1.ListChannelsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.video.livestream.v1.DeleteChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static - * @param {google.cloud.video.livestream.v1.ListChannelsResponse} message ListChannelsResponse + * @param {google.cloud.video.livestream.v1.DeleteChannelRequest} message DeleteChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelsResponse.toObject = function toObject(message, options) { + DeleteChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.channels = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channels[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ListChannelsResponse to JSON. + * Converts this DeleteChannelRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @instance * @returns {Object.} JSON object */ - ListChannelsResponse.prototype.toJSON = function toJSON() { + DeleteChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelsResponse + * Gets the default type url for DeleteChannelRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListChannelsResponse + * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListChannelsResponse"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteChannelRequest"; }; - return ListChannelsResponse; + return DeleteChannelRequest; })(); - v1.GetChannelRequest = (function() { + v1.UpdateChannelRequest = (function() { /** - * Properties of a GetChannelRequest. + * Properties of an UpdateChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IGetChannelRequest - * @property {string|null} [name] GetChannelRequest name + * @interface IUpdateChannelRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateChannelRequest updateMask + * @property {google.cloud.video.livestream.v1.IChannel|null} [channel] UpdateChannelRequest channel + * @property {string|null} [requestId] UpdateChannelRequest requestId */ /** - * Constructs a new GetChannelRequest. + * Constructs a new UpdateChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a GetChannelRequest. - * @implements IGetChannelRequest + * @classdesc Represents an UpdateChannelRequest. + * @implements IUpdateChannelRequest * @constructor - * @param {google.cloud.video.livestream.v1.IGetChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest=} [properties] Properties to set */ - function GetChannelRequest(properties) { + function UpdateChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14026,75 +17724,103 @@ } /** - * GetChannelRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * UpdateChannelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @instance */ - GetChannelRequest.prototype.name = ""; + UpdateChannelRequest.prototype.updateMask = null; /** - * Creates a new GetChannelRequest instance using the specified properties. + * UpdateChannelRequest channel. + * @member {google.cloud.video.livestream.v1.IChannel|null|undefined} channel + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @instance + */ + UpdateChannelRequest.prototype.channel = null; + + /** + * UpdateChannelRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @instance + */ + UpdateChannelRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateChannelRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IGetChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest instance + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest instance */ - GetChannelRequest.create = function create(properties) { - return new GetChannelRequest(properties); + UpdateChannelRequest.create = function create(properties) { + return new UpdateChannelRequest(properties); }; /** - * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetChannelRequest.verify|verify} messages. + * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateChannelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelRequest.encode = function encode(message, writer) { + UpdateChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.google.cloud.video.livestream.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetChannelRequest.verify|verify} messages. + * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetChannelRequest message from the specified reader or buffer. + * Decodes an UpdateChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelRequest.decode = function decode(reader, length) { + UpdateChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.UpdateChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.channel = $root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -14106,124 +17832,150 @@ }; /** - * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetChannelRequest message. + * Verifies an UpdateChannelRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetChannelRequest.verify = function verify(message) { + UpdateChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a GetChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest */ - GetChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.GetChannelRequest) + UpdateChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.UpdateChannelRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.GetChannelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.livestream.v1.UpdateChannelRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdateChannelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdateChannelRequest.channel: object expected"); + message.channel = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channel); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static - * @param {google.cloud.video.livestream.v1.GetChannelRequest} message GetChannelRequest + * @param {google.cloud.video.livestream.v1.UpdateChannelRequest} message UpdateChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetChannelRequest.toObject = function toObject(message, options) { + UpdateChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.updateMask = null; + object.channel = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channel, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this GetChannelRequest to JSON. + * Converts this UpdateChannelRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @instance * @returns {Object.} JSON object */ - GetChannelRequest.prototype.toJSON = function toJSON() { + UpdateChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetChannelRequest + * Gets the default type url for UpdateChannelRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.GetChannelRequest + * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.UpdateChannelRequest"; }; - return GetChannelRequest; + return UpdateChannelRequest; })(); - v1.DeleteChannelRequest = (function() { + v1.StartChannelRequest = (function() { /** - * Properties of a DeleteChannelRequest. + * Properties of a StartChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IDeleteChannelRequest - * @property {string|null} [name] DeleteChannelRequest name - * @property {string|null} [requestId] DeleteChannelRequest requestId - * @property {boolean|null} [force] DeleteChannelRequest force + * @interface IStartChannelRequest + * @property {string|null} [name] StartChannelRequest name + * @property {string|null} [requestId] StartChannelRequest requestId */ /** - * Constructs a new DeleteChannelRequest. + * Constructs a new StartChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a DeleteChannelRequest. - * @implements IDeleteChannelRequest + * @classdesc Represents a StartChannelRequest. + * @implements IStartChannelRequest * @constructor - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IStartChannelRequest=} [properties] Properties to set */ - function DeleteChannelRequest(properties) { + function StartChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14231,90 +17983,80 @@ } /** - * DeleteChannelRequest name. + * StartChannelRequest name. * @member {string} name - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @instance */ - DeleteChannelRequest.prototype.name = ""; + StartChannelRequest.prototype.name = ""; /** - * DeleteChannelRequest requestId. + * StartChannelRequest requestId. * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest - * @instance - */ - DeleteChannelRequest.prototype.requestId = ""; - - /** - * DeleteChannelRequest force. - * @member {boolean} force - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @instance */ - DeleteChannelRequest.prototype.force = false; + StartChannelRequest.prototype.requestId = ""; /** - * Creates a new DeleteChannelRequest instance using the specified properties. + * Creates a new StartChannelRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest instance + * @param {google.cloud.video.livestream.v1.IStartChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest instance */ - DeleteChannelRequest.create = function create(properties) { - return new DeleteChannelRequest(properties); + StartChannelRequest.create = function create(properties) { + return new StartChannelRequest(properties); }; /** - * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteChannelRequest.verify|verify} messages. + * Encodes the specified StartChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.StartChannelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IStartChannelRequest} message StartChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelRequest.encode = function encode(message, writer) { + StartChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteChannelRequest.verify|verify} messages. + * Encodes the specified StartChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.StartChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IStartChannelRequest} message StartChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + StartChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer. + * Decodes a StartChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelRequest.decode = function decode(reader, length) { + StartChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.StartChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -14326,10 +18068,6 @@ message.requestId = reader.string(); break; } - case 3: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -14339,30 +18077,30 @@ }; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a StartChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelRequest.decodeDelimited = function decodeDelimited(reader) { + StartChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteChannelRequest message. + * Verifies a StartChannelRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteChannelRequest.verify = function verify(message) { + StartChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -14371,109 +18109,100 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest */ - DeleteChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.DeleteChannelRequest) + StartChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.StartChannelRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.DeleteChannelRequest(); + var message = new $root.google.cloud.video.livestream.v1.StartChannelRequest(); if (object.name != null) message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a StartChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static - * @param {google.cloud.video.livestream.v1.DeleteChannelRequest} message DeleteChannelRequest + * @param {google.cloud.video.livestream.v1.StartChannelRequest} message StartChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteChannelRequest.toObject = function toObject(message, options) { + StartChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; object.requestId = ""; - object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteChannelRequest to JSON. + * Converts this StartChannelRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @instance * @returns {Object.} JSON object */ - DeleteChannelRequest.prototype.toJSON = function toJSON() { + StartChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteChannelRequest + * Gets the default type url for StartChannelRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.DeleteChannelRequest + * @memberof google.cloud.video.livestream.v1.StartChannelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StartChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.StartChannelRequest"; }; - return DeleteChannelRequest; + return StartChannelRequest; })(); - v1.UpdateChannelRequest = (function() { + v1.StopChannelRequest = (function() { /** - * Properties of an UpdateChannelRequest. + * Properties of a StopChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IUpdateChannelRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateChannelRequest updateMask - * @property {google.cloud.video.livestream.v1.IChannel|null} [channel] UpdateChannelRequest channel - * @property {string|null} [requestId] UpdateChannelRequest requestId + * @interface IStopChannelRequest + * @property {string|null} [name] StopChannelRequest name + * @property {string|null} [requestId] StopChannelRequest requestId */ /** - * Constructs a new UpdateChannelRequest. + * Constructs a new StopChannelRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents an UpdateChannelRequest. - * @implements IUpdateChannelRequest + * @classdesc Represents a StopChannelRequest. + * @implements IStopChannelRequest * @constructor - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IStopChannelRequest=} [properties] Properties to set */ - function UpdateChannelRequest(properties) { + function StopChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14481,102 +18210,88 @@ } /** - * UpdateChannelRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest - * @instance - */ - UpdateChannelRequest.prototype.updateMask = null; - - /** - * UpdateChannelRequest channel. - * @member {google.cloud.video.livestream.v1.IChannel|null|undefined} channel - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * StopChannelRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @instance */ - UpdateChannelRequest.prototype.channel = null; + StopChannelRequest.prototype.name = ""; /** - * UpdateChannelRequest requestId. + * StopChannelRequest requestId. * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @instance */ - UpdateChannelRequest.prototype.requestId = ""; + StopChannelRequest.prototype.requestId = ""; /** - * Creates a new UpdateChannelRequest instance using the specified properties. + * Creates a new StopChannelRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest instance + * @param {google.cloud.video.livestream.v1.IStopChannelRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest instance */ - UpdateChannelRequest.create = function create(properties) { - return new UpdateChannelRequest(properties); + StopChannelRequest.create = function create(properties) { + return new StopChannelRequest(properties); }; /** - * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateChannelRequest.verify|verify} messages. + * Encodes the specified StopChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.StopChannelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IStopChannelRequest} message StopChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateChannelRequest.encode = function encode(message, writer) { + StopChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.google.cloud.video.livestream.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateChannelRequest.verify|verify} messages. + * Encodes the specified StopChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.StopChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IStopChannelRequest} message StopChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + StopChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer. + * Decodes a StopChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateChannelRequest.decode = function decode(reader, length) { + StopChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.UpdateChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.StopChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.channel = $root.google.cloud.video.livestream.v1.Channel.decode(reader, reader.uint32()); - break; - } - case 3: { message.requestId = reader.string(); break; } @@ -14589,42 +18304,35 @@ }; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a StopChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + StopChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateChannelRequest message. + * Verifies a StopChannelRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.google.cloud.video.livestream.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } + * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -14632,107 +18340,98 @@ }; /** - * Creates an UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StopChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest */ - UpdateChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.UpdateChannelRequest) + StopChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.StopChannelRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.UpdateChannelRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.video.livestream.v1.UpdateChannelRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".google.cloud.video.livestream.v1.UpdateChannelRequest.channel: object expected"); - message.channel = $root.google.cloud.video.livestream.v1.Channel.fromObject(object.channel); - } + var message = new $root.google.cloud.video.livestream.v1.StopChannelRequest(); + if (object.name != null) + message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a StopChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static - * @param {google.cloud.video.livestream.v1.UpdateChannelRequest} message UpdateChannelRequest + * @param {google.cloud.video.livestream.v1.StopChannelRequest} message StopChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateChannelRequest.toObject = function toObject(message, options) { + StopChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.channel = null; + object.name = ""; object.requestId = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.google.cloud.video.livestream.v1.Channel.toObject(message.channel, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this UpdateChannelRequest to JSON. + * Converts this StopChannelRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @instance * @returns {Object.} JSON object */ - UpdateChannelRequest.prototype.toJSON = function toJSON() { + StopChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateChannelRequest + * Gets the default type url for StopChannelRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.UpdateChannelRequest + * @memberof google.cloud.video.livestream.v1.StopChannelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StopChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.UpdateChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.StopChannelRequest"; }; - return UpdateChannelRequest; + return StopChannelRequest; })(); - v1.StartChannelRequest = (function() { + v1.CreateInputRequest = (function() { /** - * Properties of a StartChannelRequest. + * Properties of a CreateInputRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IStartChannelRequest - * @property {string|null} [name] StartChannelRequest name - * @property {string|null} [requestId] StartChannelRequest requestId + * @interface ICreateInputRequest + * @property {string|null} [parent] CreateInputRequest parent + * @property {google.cloud.video.livestream.v1.IInput|null} [input] CreateInputRequest input + * @property {string|null} [inputId] CreateInputRequest inputId + * @property {string|null} [requestId] CreateInputRequest requestId */ /** - * Constructs a new StartChannelRequest. + * Constructs a new CreateInputRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a StartChannelRequest. - * @implements IStartChannelRequest + * @classdesc Represents a CreateInputRequest. + * @implements ICreateInputRequest * @constructor - * @param {google.cloud.video.livestream.v1.IStartChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.ICreateInputRequest=} [properties] Properties to set */ - function StartChannelRequest(properties) { + function CreateInputRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14740,88 +18439,116 @@ } /** - * StartChannelRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * CreateInputRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @instance */ - StartChannelRequest.prototype.name = ""; + CreateInputRequest.prototype.parent = ""; /** - * StartChannelRequest requestId. + * CreateInputRequest input. + * @member {google.cloud.video.livestream.v1.IInput|null|undefined} input + * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @instance + */ + CreateInputRequest.prototype.input = null; + + /** + * CreateInputRequest inputId. + * @member {string} inputId + * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @instance + */ + CreateInputRequest.prototype.inputId = ""; + + /** + * CreateInputRequest requestId. * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @instance */ - StartChannelRequest.prototype.requestId = ""; + CreateInputRequest.prototype.requestId = ""; /** - * Creates a new StartChannelRequest instance using the specified properties. + * Creates a new CreateInputRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IStartChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest instance + * @param {google.cloud.video.livestream.v1.ICreateInputRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest instance */ - StartChannelRequest.create = function create(properties) { - return new StartChannelRequest(properties); + CreateInputRequest.create = function create(properties) { + return new CreateInputRequest(properties); }; /** - * Encodes the specified StartChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.StartChannelRequest.verify|verify} messages. + * Encodes the specified CreateInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateInputRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IStartChannelRequest} message StartChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.ICreateInputRequest} message CreateInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartChannelRequest.encode = function encode(message, writer) { + CreateInputRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.cloud.video.livestream.v1.Input.encode(message.input, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inputId != null && Object.hasOwnProperty.call(message, "inputId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inputId); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified StartChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.StartChannelRequest.verify|verify} messages. + * Encodes the specified CreateInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateInputRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IStartChannelRequest} message StartChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.ICreateInputRequest} message CreateInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateInputRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartChannelRequest message from the specified reader or buffer. + * Decodes a CreateInputRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest + * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartChannelRequest.decode = function decode(reader, length) { + CreateInputRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.StartChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateInputRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.input = $root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inputId = reader.string(); + break; + } + case 4: { message.requestId = reader.string(); break; } @@ -14834,35 +18561,43 @@ }; /** - * Decodes a StartChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateInputRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest + * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartChannelRequest.decodeDelimited = function decodeDelimited(reader) { + CreateInputRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartChannelRequest message. + * Verifies a CreateInputRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartChannelRequest.verify = function verify(message) { + CreateInputRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.cloud.video.livestream.v1.Input.verify(message.input); + if (error) + return "input." + error; + } + if (message.inputId != null && message.hasOwnProperty("inputId")) + if (!$util.isString(message.inputId)) + return "inputId: string expected"; if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -14870,96 +18605,112 @@ }; /** - * Creates a StartChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateInputRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.StartChannelRequest} StartChannelRequest + * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest */ - StartChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.StartChannelRequest) + CreateInputRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.CreateInputRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.StartChannelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.livestream.v1.CreateInputRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.cloud.video.livestream.v1.CreateInputRequest.input: object expected"); + message.input = $root.google.cloud.video.livestream.v1.Input.fromObject(object.input); + } + if (object.inputId != null) + message.inputId = String(object.inputId); if (object.requestId != null) message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a StartChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateInputRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static - * @param {google.cloud.video.livestream.v1.StartChannelRequest} message StartChannelRequest + * @param {google.cloud.video.livestream.v1.CreateInputRequest} message CreateInputRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartChannelRequest.toObject = function toObject(message, options) { + CreateInputRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.input = null; + object.inputId = ""; object.requestId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.cloud.video.livestream.v1.Input.toObject(message.input, options); + if (message.inputId != null && message.hasOwnProperty("inputId")) + object.inputId = message.inputId; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this StartChannelRequest to JSON. + * Converts this CreateInputRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @instance * @returns {Object.} JSON object */ - StartChannelRequest.prototype.toJSON = function toJSON() { + CreateInputRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StartChannelRequest + * Gets the default type url for CreateInputRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.StartChannelRequest + * @memberof google.cloud.video.livestream.v1.CreateInputRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StartChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.StartChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateInputRequest"; }; - return StartChannelRequest; + return CreateInputRequest; })(); - v1.StopChannelRequest = (function() { + v1.ListInputsRequest = (function() { /** - * Properties of a StopChannelRequest. + * Properties of a ListInputsRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IStopChannelRequest - * @property {string|null} [name] StopChannelRequest name - * @property {string|null} [requestId] StopChannelRequest requestId + * @interface IListInputsRequest + * @property {string|null} [parent] ListInputsRequest parent + * @property {number|null} [pageSize] ListInputsRequest pageSize + * @property {string|null} [pageToken] ListInputsRequest pageToken + * @property {string|null} [filter] ListInputsRequest filter + * @property {string|null} [orderBy] ListInputsRequest orderBy */ /** - * Constructs a new StopChannelRequest. + * Constructs a new ListInputsRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a StopChannelRequest. - * @implements IStopChannelRequest + * @classdesc Represents a ListInputsRequest. + * @implements IListInputsRequest * @constructor - * @param {google.cloud.video.livestream.v1.IStopChannelRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IListInputsRequest=} [properties] Properties to set */ - function StopChannelRequest(properties) { + function ListInputsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14967,89 +18718,131 @@ } /** - * StopChannelRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * ListInputsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @instance */ - StopChannelRequest.prototype.name = ""; + ListInputsRequest.prototype.parent = ""; /** - * StopChannelRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * ListInputsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @instance */ - StopChannelRequest.prototype.requestId = ""; + ListInputsRequest.prototype.pageSize = 0; /** - * Creates a new StopChannelRequest instance using the specified properties. + * ListInputsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @instance + */ + ListInputsRequest.prototype.pageToken = ""; + + /** + * ListInputsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @instance + */ + ListInputsRequest.prototype.filter = ""; + + /** + * ListInputsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @instance + */ + ListInputsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListInputsRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static - * @param {google.cloud.video.livestream.v1.IStopChannelRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest instance + * @param {google.cloud.video.livestream.v1.IListInputsRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest instance */ - StopChannelRequest.create = function create(properties) { - return new StopChannelRequest(properties); + ListInputsRequest.create = function create(properties) { + return new ListInputsRequest(properties); }; /** - * Encodes the specified StopChannelRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.StopChannelRequest.verify|verify} messages. + * Encodes the specified ListInputsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static - * @param {google.cloud.video.livestream.v1.IStopChannelRequest} message StopChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListInputsRequest} message ListInputsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopChannelRequest.encode = function encode(message, writer) { + ListInputsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified StopChannelRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.StopChannelRequest.verify|verify} messages. + * Encodes the specified ListInputsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static - * @param {google.cloud.video.livestream.v1.IStopChannelRequest} message StopChannelRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListInputsRequest} message ListInputsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListInputsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopChannelRequest message from the specified reader or buffer. + * Decodes a ListInputsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest + * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopChannelRequest.decode = function decode(reader, length) { + ListInputsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.StopChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListInputsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.requestId = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -15061,134 +18854,159 @@ }; /** - * Decodes a StopChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListInputsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest + * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListInputsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopChannelRequest message. + * Verifies a ListInputsRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopChannelRequest.verify = function verify(message) { + ListInputsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a StopChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListInputsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.StopChannelRequest} StopChannelRequest + * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest */ - StopChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.StopChannelRequest) + ListInputsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListInputsRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.StopChannelRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.video.livestream.v1.ListInputsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a StopChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListInputsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static - * @param {google.cloud.video.livestream.v1.StopChannelRequest} message StopChannelRequest + * @param {google.cloud.video.livestream.v1.ListInputsRequest} message ListInputsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopChannelRequest.toObject = function toObject(message, options) { + ListInputsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.requestId = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this StopChannelRequest to JSON. + * Converts this ListInputsRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @instance * @returns {Object.} JSON object */ - StopChannelRequest.prototype.toJSON = function toJSON() { + ListInputsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StopChannelRequest + * Gets the default type url for ListInputsRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.StopChannelRequest + * @memberof google.cloud.video.livestream.v1.ListInputsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListInputsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.StopChannelRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListInputsRequest"; }; - return StopChannelRequest; + return ListInputsRequest; })(); - v1.CreateInputRequest = (function() { + v1.ListInputsResponse = (function() { - /** - * Properties of a CreateInputRequest. - * @memberof google.cloud.video.livestream.v1 - * @interface ICreateInputRequest - * @property {string|null} [parent] CreateInputRequest parent - * @property {google.cloud.video.livestream.v1.IInput|null} [input] CreateInputRequest input - * @property {string|null} [inputId] CreateInputRequest inputId - * @property {string|null} [requestId] CreateInputRequest requestId + /** + * Properties of a ListInputsResponse. + * @memberof google.cloud.video.livestream.v1 + * @interface IListInputsResponse + * @property {Array.|null} [inputs] ListInputsResponse inputs + * @property {string|null} [nextPageToken] ListInputsResponse nextPageToken + * @property {Array.|null} [unreachable] ListInputsResponse unreachable */ /** - * Constructs a new CreateInputRequest. + * Constructs a new ListInputsResponse. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a CreateInputRequest. - * @implements ICreateInputRequest + * @classdesc Represents a ListInputsResponse. + * @implements IListInputsResponse * @constructor - * @param {google.cloud.video.livestream.v1.ICreateInputRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IListInputsResponse=} [properties] Properties to set */ - function CreateInputRequest(properties) { + function ListInputsResponse(properties) { + this.inputs = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15196,117 +19014,109 @@ } /** - * CreateInputRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.CreateInputRequest - * @instance - */ - CreateInputRequest.prototype.parent = ""; - - /** - * CreateInputRequest input. - * @member {google.cloud.video.livestream.v1.IInput|null|undefined} input - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * ListInputsResponse inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @instance */ - CreateInputRequest.prototype.input = null; + ListInputsResponse.prototype.inputs = $util.emptyArray; /** - * CreateInputRequest inputId. - * @member {string} inputId - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * ListInputsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @instance */ - CreateInputRequest.prototype.inputId = ""; + ListInputsResponse.prototype.nextPageToken = ""; /** - * CreateInputRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * ListInputsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @instance */ - CreateInputRequest.prototype.requestId = ""; + ListInputsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new CreateInputRequest instance using the specified properties. + * Creates a new ListInputsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateInputRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest instance + * @param {google.cloud.video.livestream.v1.IListInputsResponse=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse instance */ - CreateInputRequest.create = function create(properties) { - return new CreateInputRequest(properties); + ListInputsResponse.create = function create(properties) { + return new ListInputsResponse(properties); }; /** - * Encodes the specified CreateInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateInputRequest.verify|verify} messages. + * Encodes the specified ListInputsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateInputRequest} message CreateInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListInputsResponse} message ListInputsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInputRequest.encode = function encode(message, writer) { + ListInputsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.input != null && Object.hasOwnProperty.call(message, "input")) - $root.google.cloud.video.livestream.v1.Input.encode(message.input, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inputId != null && Object.hasOwnProperty.call(message, "inputId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.inputId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.google.cloud.video.livestream.v1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified CreateInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateInputRequest.verify|verify} messages. + * Encodes the specified ListInputsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateInputRequest} message CreateInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListInputsResponse} message ListInputsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInputRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListInputsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateInputRequest message from the specified reader or buffer. + * Decodes a ListInputsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest + * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateInputRequest.decode = function decode(reader, length) { + ListInputsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateInputRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListInputsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32())); break; } case 2: { - message.input = $root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.inputId = reader.string(); - break; - } - case 4: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -15318,156 +19128,169 @@ }; /** - * Decodes a CreateInputRequest message from the specified reader or buffer, length delimited. + * Decodes a ListInputsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest + * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateInputRequest.decodeDelimited = function decodeDelimited(reader) { + ListInputsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateInputRequest message. + * Verifies a ListInputsResponse message. * @function verify - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateInputRequest.verify = function verify(message) { + ListInputsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.cloud.video.livestream.v1.Input.verify(message.input); - if (error) - return "input." + error; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.google.cloud.video.livestream.v1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.inputId != null && message.hasOwnProperty("inputId")) - if (!$util.isString(message.inputId)) - return "inputId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a CreateInputRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListInputsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.CreateInputRequest} CreateInputRequest + * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse */ - CreateInputRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.CreateInputRequest) + ListInputsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListInputsResponse) return object; - var message = new $root.google.cloud.video.livestream.v1.CreateInputRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.cloud.video.livestream.v1.CreateInputRequest.input: object expected"); - message.input = $root.google.cloud.video.livestream.v1.Input.fromObject(object.input); + var message = new $root.google.cloud.video.livestream.v1.ListInputsResponse(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.inputs: object expected"); + message.inputs[i] = $root.google.cloud.video.livestream.v1.Input.fromObject(object.inputs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.inputId != null) - message.inputId = String(object.inputId); - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateInputRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListInputsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static - * @param {google.cloud.video.livestream.v1.CreateInputRequest} message CreateInputRequest + * @param {google.cloud.video.livestream.v1.ListInputsResponse} message ListInputsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateInputRequest.toObject = function toObject(message, options) { + ListInputsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.input = null; - object.inputId = ""; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.inputs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.google.cloud.video.livestream.v1.Input.toObject(message.inputs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.cloud.video.livestream.v1.Input.toObject(message.input, options); - if (message.inputId != null && message.hasOwnProperty("inputId")) - object.inputId = message.inputId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this CreateInputRequest to JSON. + * Converts this ListInputsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @instance * @returns {Object.} JSON object */ - CreateInputRequest.prototype.toJSON = function toJSON() { + ListInputsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateInputRequest + * Gets the default type url for ListInputsResponse * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.CreateInputRequest + * @memberof google.cloud.video.livestream.v1.ListInputsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListInputsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateInputRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListInputsResponse"; }; - return CreateInputRequest; + return ListInputsResponse; })(); - v1.ListInputsRequest = (function() { + v1.GetInputRequest = (function() { /** - * Properties of a ListInputsRequest. + * Properties of a GetInputRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListInputsRequest - * @property {string|null} [parent] ListInputsRequest parent - * @property {number|null} [pageSize] ListInputsRequest pageSize - * @property {string|null} [pageToken] ListInputsRequest pageToken - * @property {string|null} [filter] ListInputsRequest filter - * @property {string|null} [orderBy] ListInputsRequest orderBy + * @interface IGetInputRequest + * @property {string|null} [name] GetInputRequest name */ /** - * Constructs a new ListInputsRequest. + * Constructs a new GetInputRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListInputsRequest. - * @implements IListInputsRequest + * @classdesc Represents a GetInputRequest. + * @implements IGetInputRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListInputsRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IGetInputRequest=} [properties] Properties to set */ - function ListInputsRequest(properties) { + function GetInputRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15475,131 +19298,75 @@ } /** - * ListInputsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.ListInputsRequest - * @instance - */ - ListInputsRequest.prototype.parent = ""; - - /** - * ListInputsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.livestream.v1.ListInputsRequest - * @instance - */ - ListInputsRequest.prototype.pageSize = 0; - - /** - * ListInputsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.livestream.v1.ListInputsRequest - * @instance - */ - ListInputsRequest.prototype.pageToken = ""; - - /** - * ListInputsRequest filter. - * @member {string} filter - * @memberof google.cloud.video.livestream.v1.ListInputsRequest - * @instance - */ - ListInputsRequest.prototype.filter = ""; - - /** - * ListInputsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * GetInputRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @instance */ - ListInputsRequest.prototype.orderBy = ""; + GetInputRequest.prototype.name = ""; /** - * Creates a new ListInputsRequest instance using the specified properties. + * Creates a new GetInputRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest instance + * @param {google.cloud.video.livestream.v1.IGetInputRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest instance */ - ListInputsRequest.create = function create(properties) { - return new ListInputsRequest(properties); + GetInputRequest.create = function create(properties) { + return new GetInputRequest(properties); }; /** - * Encodes the specified ListInputsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsRequest.verify|verify} messages. + * Encodes the specified GetInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetInputRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsRequest} message ListInputsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetInputRequest} message GetInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInputsRequest.encode = function encode(message, writer) { + GetInputRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListInputsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsRequest.verify|verify} messages. + * Encodes the specified GetInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetInputRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsRequest} message ListInputsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetInputRequest} message GetInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInputsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetInputRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInputsRequest message from the specified reader or buffer. + * Decodes a GetInputRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest + * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInputsRequest.decode = function decode(reader, length) { + GetInputRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListInputsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetInputRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -15611,159 +19378,123 @@ }; /** - * Decodes a ListInputsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetInputRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest + * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInputsRequest.decodeDelimited = function decodeDelimited(reader) { + GetInputRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListInputsRequest message. + * Verifies a GetInputRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListInputsRequest.verify = function verify(message) { + GetInputRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListInputsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetInputRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListInputsRequest} ListInputsRequest + * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest */ - ListInputsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListInputsRequest) + GetInputRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.GetInputRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListInputsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.video.livestream.v1.GetInputRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListInputsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetInputRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static - * @param {google.cloud.video.livestream.v1.ListInputsRequest} message ListInputsRequest + * @param {google.cloud.video.livestream.v1.GetInputRequest} message GetInputRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInputsRequest.toObject = function toObject(message, options) { + GetInputRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListInputsRequest to JSON. + * Converts this GetInputRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @instance * @returns {Object.} JSON object */ - ListInputsRequest.prototype.toJSON = function toJSON() { + GetInputRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListInputsRequest + * Gets the default type url for GetInputRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListInputsRequest + * @memberof google.cloud.video.livestream.v1.GetInputRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListInputsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListInputsRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetInputRequest"; }; - return ListInputsRequest; + return GetInputRequest; })(); - v1.ListInputsResponse = (function() { + v1.DeleteInputRequest = (function() { /** - * Properties of a ListInputsResponse. + * Properties of a DeleteInputRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListInputsResponse - * @property {Array.|null} [inputs] ListInputsResponse inputs - * @property {string|null} [nextPageToken] ListInputsResponse nextPageToken - * @property {Array.|null} [unreachable] ListInputsResponse unreachable + * @interface IDeleteInputRequest + * @property {string|null} [name] DeleteInputRequest name + * @property {string|null} [requestId] DeleteInputRequest requestId */ /** - * Constructs a new ListInputsResponse. + * Constructs a new DeleteInputRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListInputsResponse. - * @implements IListInputsResponse + * @classdesc Represents a DeleteInputRequest. + * @implements IDeleteInputRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListInputsResponse=} [properties] Properties to set - */ - function ListInputsResponse(properties) { - this.inputs = []; - this.unreachable = []; + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest=} [properties] Properties to set + */ + function DeleteInputRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15771,109 +19502,89 @@ } /** - * ListInputsResponse inputs. - * @member {Array.} inputs - * @memberof google.cloud.video.livestream.v1.ListInputsResponse - * @instance - */ - ListInputsResponse.prototype.inputs = $util.emptyArray; - - /** - * ListInputsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * DeleteInputRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @instance */ - ListInputsResponse.prototype.nextPageToken = ""; + DeleteInputRequest.prototype.name = ""; /** - * ListInputsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * DeleteInputRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @instance */ - ListInputsResponse.prototype.unreachable = $util.emptyArray; + DeleteInputRequest.prototype.requestId = ""; /** - * Creates a new ListInputsResponse instance using the specified properties. + * Creates a new DeleteInputRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsResponse=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse instance + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest instance */ - ListInputsResponse.create = function create(properties) { - return new ListInputsResponse(properties); + DeleteInputRequest.create = function create(properties) { + return new DeleteInputRequest(properties); }; /** - * Encodes the specified ListInputsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsResponse.verify|verify} messages. + * Encodes the specified DeleteInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteInputRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsResponse} message ListInputsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} message DeleteInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInputsResponse.encode = function encode(message, writer) { + DeleteInputRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - $root.google.cloud.video.livestream.v1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified ListInputsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListInputsResponse.verify|verify} messages. + * Encodes the specified DeleteInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteInputRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static - * @param {google.cloud.video.livestream.v1.IListInputsResponse} message ListInputsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} message DeleteInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInputsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteInputRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInputsResponse message from the specified reader or buffer. + * Decodes a DeleteInputRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse + * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInputsResponse.decode = function decode(reader, length) { + DeleteInputRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListInputsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteInputRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.requestId = reader.string(); break; } default: @@ -15885,169 +19596,133 @@ }; /** - * Decodes a ListInputsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteInputRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse + * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInputsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteInputRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListInputsResponse message. + * Verifies a DeleteInputRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListInputsResponse.verify = function verify(message) { + DeleteInputRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) { - var error = $root.google.cloud.video.livestream.v1.Input.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListInputsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteInputRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListInputsResponse} ListInputsResponse + * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest */ - ListInputsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListInputsResponse) + DeleteInputRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.DeleteInputRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListInputsResponse(); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.inputs: object expected"); - message.inputs[i] = $root.google.cloud.video.livestream.v1.Input.fromObject(object.inputs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.video.livestream.v1.ListInputsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.video.livestream.v1.DeleteInputRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListInputsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteInputRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static - * @param {google.cloud.video.livestream.v1.ListInputsResponse} message ListInputsResponse + * @param {google.cloud.video.livestream.v1.DeleteInputRequest} message DeleteInputRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInputsResponse.toObject = function toObject(message, options) { + DeleteInputRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.inputs = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.google.cloud.video.livestream.v1.Input.toObject(message.inputs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.requestId = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListInputsResponse to JSON. + * Converts this DeleteInputRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @instance * @returns {Object.} JSON object */ - ListInputsResponse.prototype.toJSON = function toJSON() { + DeleteInputRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListInputsResponse + * Gets the default type url for DeleteInputRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListInputsResponse + * @memberof google.cloud.video.livestream.v1.DeleteInputRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListInputsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListInputsResponse"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteInputRequest"; }; - return ListInputsResponse; + return DeleteInputRequest; })(); - v1.GetInputRequest = (function() { + v1.UpdateInputRequest = (function() { /** - * Properties of a GetInputRequest. + * Properties of an UpdateInputRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IGetInputRequest - * @property {string|null} [name] GetInputRequest name + * @interface IUpdateInputRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateInputRequest updateMask + * @property {google.cloud.video.livestream.v1.IInput|null} [input] UpdateInputRequest input + * @property {string|null} [requestId] UpdateInputRequest requestId */ /** - * Constructs a new GetInputRequest. + * Constructs a new UpdateInputRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a GetInputRequest. - * @implements IGetInputRequest + * @classdesc Represents an UpdateInputRequest. + * @implements IUpdateInputRequest * @constructor - * @param {google.cloud.video.livestream.v1.IGetInputRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest=} [properties] Properties to set */ - function GetInputRequest(properties) { + function UpdateInputRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16055,75 +19730,103 @@ } /** - * GetInputRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * UpdateInputRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @instance */ - GetInputRequest.prototype.name = ""; + UpdateInputRequest.prototype.updateMask = null; /** - * Creates a new GetInputRequest instance using the specified properties. + * UpdateInputRequest input. + * @member {google.cloud.video.livestream.v1.IInput|null|undefined} input + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @instance + */ + UpdateInputRequest.prototype.input = null; + + /** + * UpdateInputRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @instance + */ + UpdateInputRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateInputRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IGetInputRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest instance + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest instance */ - GetInputRequest.create = function create(properties) { - return new GetInputRequest(properties); + UpdateInputRequest.create = function create(properties) { + return new UpdateInputRequest(properties); }; /** - * Encodes the specified GetInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetInputRequest.verify|verify} messages. + * Encodes the specified UpdateInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateInputRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IGetInputRequest} message GetInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} message UpdateInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInputRequest.encode = function encode(message, writer) { + UpdateInputRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.cloud.video.livestream.v1.Input.encode(message.input, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified GetInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetInputRequest.verify|verify} messages. + * Encodes the specified UpdateInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateInputRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static - * @param {google.cloud.video.livestream.v1.IGetInputRequest} message GetInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} message UpdateInputRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInputRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateInputRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetInputRequest message from the specified reader or buffer. + * Decodes an UpdateInputRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest + * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetInputRequest.decode = function decode(reader, length) { + UpdateInputRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetInputRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.UpdateInputRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.input = $root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -16135,123 +19838,152 @@ }; /** - * Decodes a GetInputRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateInputRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest + * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetInputRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateInputRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetInputRequest message. + * Verifies an UpdateInputRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetInputRequest.verify = function verify(message) { + UpdateInputRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.cloud.video.livestream.v1.Input.verify(message.input); + if (error) + return "input." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a GetInputRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateInputRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.GetInputRequest} GetInputRequest + * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest */ - GetInputRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.GetInputRequest) + UpdateInputRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.UpdateInputRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.GetInputRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.livestream.v1.UpdateInputRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdateInputRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdateInputRequest.input: object expected"); + message.input = $root.google.cloud.video.livestream.v1.Input.fromObject(object.input); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a GetInputRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateInputRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static - * @param {google.cloud.video.livestream.v1.GetInputRequest} message GetInputRequest + * @param {google.cloud.video.livestream.v1.UpdateInputRequest} message UpdateInputRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetInputRequest.toObject = function toObject(message, options) { + UpdateInputRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.updateMask = null; + object.input = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.cloud.video.livestream.v1.Input.toObject(message.input, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this GetInputRequest to JSON. + * Converts this UpdateInputRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @instance * @returns {Object.} JSON object */ - GetInputRequest.prototype.toJSON = function toJSON() { + UpdateInputRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetInputRequest + * Gets the default type url for UpdateInputRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.GetInputRequest + * @memberof google.cloud.video.livestream.v1.UpdateInputRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetInputRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.UpdateInputRequest"; }; - return GetInputRequest; + return UpdateInputRequest; })(); - v1.DeleteInputRequest = (function() { + v1.CreateEventRequest = (function() { /** - * Properties of a DeleteInputRequest. + * Properties of a CreateEventRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IDeleteInputRequest - * @property {string|null} [name] DeleteInputRequest name - * @property {string|null} [requestId] DeleteInputRequest requestId + * @interface ICreateEventRequest + * @property {string|null} [parent] CreateEventRequest parent + * @property {google.cloud.video.livestream.v1.IEvent|null} [event] CreateEventRequest event + * @property {string|null} [eventId] CreateEventRequest eventId + * @property {string|null} [requestId] CreateEventRequest requestId */ /** - * Constructs a new DeleteInputRequest. + * Constructs a new CreateEventRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a DeleteInputRequest. - * @implements IDeleteInputRequest + * @classdesc Represents a CreateEventRequest. + * @implements ICreateEventRequest * @constructor - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.ICreateEventRequest=} [properties] Properties to set */ - function DeleteInputRequest(properties) { + function CreateEventRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16259,88 +19991,116 @@ } /** - * DeleteInputRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * CreateEventRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @instance */ - DeleteInputRequest.prototype.name = ""; + CreateEventRequest.prototype.parent = ""; /** - * DeleteInputRequest requestId. + * CreateEventRequest event. + * @member {google.cloud.video.livestream.v1.IEvent|null|undefined} event + * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @instance + */ + CreateEventRequest.prototype.event = null; + + /** + * CreateEventRequest eventId. + * @member {string} eventId + * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @instance + */ + CreateEventRequest.prototype.eventId = ""; + + /** + * CreateEventRequest requestId. * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @instance */ - DeleteInputRequest.prototype.requestId = ""; + CreateEventRequest.prototype.requestId = ""; /** - * Creates a new DeleteInputRequest instance using the specified properties. + * Creates a new CreateEventRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest instance + * @param {google.cloud.video.livestream.v1.ICreateEventRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest instance */ - DeleteInputRequest.create = function create(properties) { - return new DeleteInputRequest(properties); + CreateEventRequest.create = function create(properties) { + return new CreateEventRequest(properties); }; /** - * Encodes the specified DeleteInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteInputRequest.verify|verify} messages. + * Encodes the specified CreateEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateEventRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} message DeleteInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.ICreateEventRequest} message CreateEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteInputRequest.encode = function encode(message, writer) { + CreateEventRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.google.cloud.video.livestream.v1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.eventId != null && Object.hasOwnProperty.call(message, "eventId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventId); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified DeleteInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteInputRequest.verify|verify} messages. + * Encodes the specified CreateEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateEventRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static - * @param {google.cloud.video.livestream.v1.IDeleteInputRequest} message DeleteInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.ICreateEventRequest} message CreateEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteInputRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEventRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteInputRequest message from the specified reader or buffer. + * Decodes a CreateEventRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest + * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteInputRequest.decode = function decode(reader, length) { + CreateEventRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteInputRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateEventRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.event = $root.google.cloud.video.livestream.v1.Event.decode(reader, reader.uint32()); + break; + } + case 3: { + message.eventId = reader.string(); break; } - case 2: { + case 4: { message.requestId = reader.string(); break; } @@ -16353,35 +20113,43 @@ }; /** - * Decodes a DeleteInputRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEventRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest + * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteInputRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEventRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteInputRequest message. + * Verifies a CreateEventRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteInputRequest.verify = function verify(message) { + CreateEventRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.event != null && message.hasOwnProperty("event")) { + var error = $root.google.cloud.video.livestream.v1.Event.verify(message.event); + if (error) + return "event." + error; + } + if (message.eventId != null && message.hasOwnProperty("eventId")) + if (!$util.isString(message.eventId)) + return "eventId: string expected"; if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -16389,97 +20157,112 @@ }; /** - * Creates a DeleteInputRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEventRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.DeleteInputRequest} DeleteInputRequest + * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest */ - DeleteInputRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.DeleteInputRequest) + CreateEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.CreateEventRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.DeleteInputRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.livestream.v1.CreateEventRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".google.cloud.video.livestream.v1.CreateEventRequest.event: object expected"); + message.event = $root.google.cloud.video.livestream.v1.Event.fromObject(object.event); + } + if (object.eventId != null) + message.eventId = String(object.eventId); if (object.requestId != null) message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a DeleteInputRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEventRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static - * @param {google.cloud.video.livestream.v1.DeleteInputRequest} message DeleteInputRequest + * @param {google.cloud.video.livestream.v1.CreateEventRequest} message CreateEventRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteInputRequest.toObject = function toObject(message, options) { + CreateEventRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.event = null; + object.eventId = ""; object.requestId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.event != null && message.hasOwnProperty("event")) + object.event = $root.google.cloud.video.livestream.v1.Event.toObject(message.event, options); + if (message.eventId != null && message.hasOwnProperty("eventId")) + object.eventId = message.eventId; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this DeleteInputRequest to JSON. + * Converts this CreateEventRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @instance * @returns {Object.} JSON object */ - DeleteInputRequest.prototype.toJSON = function toJSON() { + CreateEventRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteInputRequest + * Gets the default type url for CreateEventRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.DeleteInputRequest + * @memberof google.cloud.video.livestream.v1.CreateEventRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteInputRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateEventRequest"; }; - return DeleteInputRequest; + return CreateEventRequest; })(); - v1.UpdateInputRequest = (function() { + v1.ListEventsRequest = (function() { /** - * Properties of an UpdateInputRequest. + * Properties of a ListEventsRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IUpdateInputRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateInputRequest updateMask - * @property {google.cloud.video.livestream.v1.IInput|null} [input] UpdateInputRequest input - * @property {string|null} [requestId] UpdateInputRequest requestId + * @interface IListEventsRequest + * @property {string|null} [parent] ListEventsRequest parent + * @property {number|null} [pageSize] ListEventsRequest pageSize + * @property {string|null} [pageToken] ListEventsRequest pageToken + * @property {string|null} [filter] ListEventsRequest filter + * @property {string|null} [orderBy] ListEventsRequest orderBy */ /** - * Constructs a new UpdateInputRequest. + * Constructs a new ListEventsRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents an UpdateInputRequest. - * @implements IUpdateInputRequest + * @classdesc Represents a ListEventsRequest. + * @implements IListEventsRequest * @constructor - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IListEventsRequest=} [properties] Properties to set */ - function UpdateInputRequest(properties) { + function ListEventsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16487,103 +20270,131 @@ } /** - * UpdateInputRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * ListEventsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @instance */ - UpdateInputRequest.prototype.updateMask = null; + ListEventsRequest.prototype.parent = ""; /** - * UpdateInputRequest input. - * @member {google.cloud.video.livestream.v1.IInput|null|undefined} input - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * ListEventsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @instance */ - UpdateInputRequest.prototype.input = null; + ListEventsRequest.prototype.pageSize = 0; /** - * UpdateInputRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * ListEventsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @instance */ - UpdateInputRequest.prototype.requestId = ""; + ListEventsRequest.prototype.pageToken = ""; /** - * Creates a new UpdateInputRequest instance using the specified properties. + * ListEventsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @instance + */ + ListEventsRequest.prototype.filter = ""; + + /** + * ListEventsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @instance + */ + ListEventsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListEventsRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest instance + * @param {google.cloud.video.livestream.v1.IListEventsRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest instance */ - UpdateInputRequest.create = function create(properties) { - return new UpdateInputRequest(properties); + ListEventsRequest.create = function create(properties) { + return new ListEventsRequest(properties); }; /** - * Encodes the specified UpdateInputRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateInputRequest.verify|verify} messages. + * Encodes the specified ListEventsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} message UpdateInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListEventsRequest} message ListEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateInputRequest.encode = function encode(message, writer) { + ListEventsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.input != null && Object.hasOwnProperty.call(message, "input")) - $root.google.cloud.video.livestream.v1.Input.encode(message.input, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified UpdateInputRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdateInputRequest.verify|verify} messages. + * Encodes the specified ListEventsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static - * @param {google.cloud.video.livestream.v1.IUpdateInputRequest} message UpdateInputRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListEventsRequest} message ListEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateInputRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateInputRequest message from the specified reader or buffer. + * Decodes a ListEventsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest + * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateInputRequest.decode = function decode(reader, length) { + ListEventsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.UpdateInputRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListEventsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.input = $root.google.cloud.video.livestream.v1.Input.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.requestId = reader.string(); + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -16595,152 +20406,159 @@ }; /** - * Decodes an UpdateInputRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest + * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateInputRequest.decodeDelimited = function decodeDelimited(reader) { + ListEventsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateInputRequest message. - * @function verify - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateInputRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.cloud.video.livestream.v1.Input.verify(message.input); - if (error) - return "input." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + * Verifies a ListEventsRequest message. + * @function verify + * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates an UpdateInputRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.UpdateInputRequest} UpdateInputRequest + * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest */ - UpdateInputRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.UpdateInputRequest) + ListEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListEventsRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.UpdateInputRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.video.livestream.v1.UpdateInputRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.cloud.video.livestream.v1.UpdateInputRequest.input: object expected"); - message.input = $root.google.cloud.video.livestream.v1.Input.fromObject(object.input); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.video.livestream.v1.ListEventsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from an UpdateInputRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEventsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static - * @param {google.cloud.video.livestream.v1.UpdateInputRequest} message UpdateInputRequest + * @param {google.cloud.video.livestream.v1.ListEventsRequest} message ListEventsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateInputRequest.toObject = function toObject(message, options) { + ListEventsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.input = null; - object.requestId = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.cloud.video.livestream.v1.Input.toObject(message.input, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this UpdateInputRequest to JSON. + * Converts this ListEventsRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @instance * @returns {Object.} JSON object */ - UpdateInputRequest.prototype.toJSON = function toJSON() { + ListEventsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateInputRequest + * Gets the default type url for ListEventsRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.UpdateInputRequest + * @memberof google.cloud.video.livestream.v1.ListEventsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.UpdateInputRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListEventsRequest"; }; - return UpdateInputRequest; + return ListEventsRequest; })(); - v1.CreateEventRequest = (function() { + v1.ListEventsResponse = (function() { /** - * Properties of a CreateEventRequest. + * Properties of a ListEventsResponse. * @memberof google.cloud.video.livestream.v1 - * @interface ICreateEventRequest - * @property {string|null} [parent] CreateEventRequest parent - * @property {google.cloud.video.livestream.v1.IEvent|null} [event] CreateEventRequest event - * @property {string|null} [eventId] CreateEventRequest eventId - * @property {string|null} [requestId] CreateEventRequest requestId + * @interface IListEventsResponse + * @property {Array.|null} [events] ListEventsResponse events + * @property {string|null} [nextPageToken] ListEventsResponse nextPageToken + * @property {Array.|null} [unreachable] ListEventsResponse unreachable */ /** - * Constructs a new CreateEventRequest. + * Constructs a new ListEventsResponse. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a CreateEventRequest. - * @implements ICreateEventRequest + * @classdesc Represents a ListEventsResponse. + * @implements IListEventsResponse * @constructor - * @param {google.cloud.video.livestream.v1.ICreateEventRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IListEventsResponse=} [properties] Properties to set */ - function CreateEventRequest(properties) { + function ListEventsResponse(properties) { + this.events = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16748,117 +20566,109 @@ } /** - * CreateEventRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.CreateEventRequest - * @instance - */ - CreateEventRequest.prototype.parent = ""; - - /** - * CreateEventRequest event. - * @member {google.cloud.video.livestream.v1.IEvent|null|undefined} event - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * ListEventsResponse events. + * @member {Array.} events + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @instance */ - CreateEventRequest.prototype.event = null; + ListEventsResponse.prototype.events = $util.emptyArray; /** - * CreateEventRequest eventId. - * @member {string} eventId - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * ListEventsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @instance */ - CreateEventRequest.prototype.eventId = ""; + ListEventsResponse.prototype.nextPageToken = ""; /** - * CreateEventRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * ListEventsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @instance */ - CreateEventRequest.prototype.requestId = ""; + ListEventsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new CreateEventRequest instance using the specified properties. + * Creates a new ListEventsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateEventRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest instance + * @param {google.cloud.video.livestream.v1.IListEventsResponse=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse instance */ - CreateEventRequest.create = function create(properties) { - return new CreateEventRequest(properties); + ListEventsResponse.create = function create(properties) { + return new ListEventsResponse(properties); }; /** - * Encodes the specified CreateEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.CreateEventRequest.verify|verify} messages. + * Encodes the specified ListEventsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateEventRequest} message CreateEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListEventsResponse} message ListEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEventRequest.encode = function encode(message, writer) { + ListEventsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.google.cloud.video.livestream.v1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.eventId != null && Object.hasOwnProperty.call(message, "eventId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.cloud.video.livestream.v1.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified CreateEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.CreateEventRequest.verify|verify} messages. + * Encodes the specified ListEventsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static - * @param {google.cloud.video.livestream.v1.ICreateEventRequest} message CreateEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IListEventsResponse} message ListEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEventRequest message from the specified reader or buffer. + * Decodes a ListEventsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest + * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEventRequest.decode = function decode(reader, length) { + ListEventsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.CreateEventRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListEventsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.cloud.video.livestream.v1.Event.decode(reader, reader.uint32())); break; } case 2: { - message.event = $root.google.cloud.video.livestream.v1.Event.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.eventId = reader.string(); - break; - } - case 4: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -16870,156 +20680,169 @@ }; /** - * Decodes a CreateEventRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest + * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEventRequest.decodeDelimited = function decodeDelimited(reader) { + ListEventsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEventRequest message. + * Verifies a ListEventsResponse message. * @function verify - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEventRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.google.cloud.video.livestream.v1.Event.verify(message.event); - if (error) - return "event." + error; + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.cloud.video.livestream.v1.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.eventId != null && message.hasOwnProperty("eventId")) - if (!$util.isString(message.eventId)) - return "eventId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a CreateEventRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.CreateEventRequest} CreateEventRequest + * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse */ - CreateEventRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.CreateEventRequest) + ListEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ListEventsResponse) return object; - var message = new $root.google.cloud.video.livestream.v1.CreateEventRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".google.cloud.video.livestream.v1.CreateEventRequest.event: object expected"); - message.event = $root.google.cloud.video.livestream.v1.Event.fromObject(object.event); + var message = new $root.google.cloud.video.livestream.v1.ListEventsResponse(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.events: object expected"); + message.events[i] = $root.google.cloud.video.livestream.v1.Event.fromObject(object.events[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.eventId != null) - message.eventId = String(object.eventId); - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateEventRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEventsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static - * @param {google.cloud.video.livestream.v1.CreateEventRequest} message CreateEventRequest + * @param {google.cloud.video.livestream.v1.ListEventsResponse} message ListEventsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEventRequest.toObject = function toObject(message, options) { + ListEventsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.event = null; - object.eventId = ""; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.events = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.cloud.video.livestream.v1.Event.toObject(message.events[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.google.cloud.video.livestream.v1.Event.toObject(message.event, options); - if (message.eventId != null && message.hasOwnProperty("eventId")) - object.eventId = message.eventId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this CreateEventRequest to JSON. + * Converts this ListEventsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @instance * @returns {Object.} JSON object */ - CreateEventRequest.prototype.toJSON = function toJSON() { + ListEventsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEventRequest + * Gets the default type url for ListEventsResponse * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.CreateEventRequest + * @memberof google.cloud.video.livestream.v1.ListEventsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.CreateEventRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListEventsResponse"; }; - return CreateEventRequest; + return ListEventsResponse; })(); - v1.ListEventsRequest = (function() { + v1.GetEventRequest = (function() { /** - * Properties of a ListEventsRequest. + * Properties of a GetEventRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListEventsRequest - * @property {string|null} [parent] ListEventsRequest parent - * @property {number|null} [pageSize] ListEventsRequest pageSize - * @property {string|null} [pageToken] ListEventsRequest pageToken - * @property {string|null} [filter] ListEventsRequest filter - * @property {string|null} [orderBy] ListEventsRequest orderBy + * @interface IGetEventRequest + * @property {string|null} [name] GetEventRequest name */ /** - * Constructs a new ListEventsRequest. + * Constructs a new GetEventRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListEventsRequest. - * @implements IListEventsRequest + * @classdesc Represents a GetEventRequest. + * @implements IGetEventRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListEventsRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IGetEventRequest=} [properties] Properties to set */ - function ListEventsRequest(properties) { + function GetEventRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17027,131 +20850,75 @@ } /** - * ListEventsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.livestream.v1.ListEventsRequest - * @instance - */ - ListEventsRequest.prototype.parent = ""; - - /** - * ListEventsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.livestream.v1.ListEventsRequest - * @instance - */ - ListEventsRequest.prototype.pageSize = 0; - - /** - * ListEventsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.livestream.v1.ListEventsRequest - * @instance - */ - ListEventsRequest.prototype.pageToken = ""; - - /** - * ListEventsRequest filter. - * @member {string} filter - * @memberof google.cloud.video.livestream.v1.ListEventsRequest - * @instance - */ - ListEventsRequest.prototype.filter = ""; - - /** - * ListEventsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * GetEventRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @instance */ - ListEventsRequest.prototype.orderBy = ""; + GetEventRequest.prototype.name = ""; /** - * Creates a new ListEventsRequest instance using the specified properties. + * Creates a new GetEventRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest instance + * @param {google.cloud.video.livestream.v1.IGetEventRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest instance */ - ListEventsRequest.create = function create(properties) { - return new ListEventsRequest(properties); + GetEventRequest.create = function create(properties) { + return new GetEventRequest(properties); }; /** - * Encodes the specified ListEventsRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsRequest.verify|verify} messages. + * Encodes the specified GetEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetEventRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsRequest} message ListEventsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetEventRequest} message GetEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEventsRequest.encode = function encode(message, writer) { + GetEventRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListEventsRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsRequest.verify|verify} messages. + * Encodes the specified GetEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetEventRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsRequest} message ListEventsRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetEventRequest} message GetEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEventRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEventsRequest message from the specified reader or buffer. + * Decodes a GetEventRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest + * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEventsRequest.decode = function decode(reader, length) { + GetEventRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListEventsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetEventRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -17163,159 +20930,123 @@ }; /** - * Decodes a ListEventsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEventRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest + * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEventsRequest.decodeDelimited = function decodeDelimited(reader) { + GetEventRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEventsRequest message. + * Verifies a GetEventRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEventsRequest.verify = function verify(message) { + GetEventRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListEventsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEventRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListEventsRequest} ListEventsRequest + * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest */ - ListEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListEventsRequest) + GetEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.GetEventRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListEventsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.video.livestream.v1.GetEventRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListEventsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEventRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static - * @param {google.cloud.video.livestream.v1.ListEventsRequest} message ListEventsRequest + * @param {google.cloud.video.livestream.v1.GetEventRequest} message GetEventRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEventsRequest.toObject = function toObject(message, options) { + GetEventRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListEventsRequest to JSON. + * Converts this GetEventRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @instance * @returns {Object.} JSON object */ - ListEventsRequest.prototype.toJSON = function toJSON() { + GetEventRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEventsRequest + * Gets the default type url for GetEventRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListEventsRequest + * @memberof google.cloud.video.livestream.v1.GetEventRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListEventsRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetEventRequest"; }; - return ListEventsRequest; + return GetEventRequest; })(); - v1.ListEventsResponse = (function() { + v1.DeleteEventRequest = (function() { /** - * Properties of a ListEventsResponse. + * Properties of a DeleteEventRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IListEventsResponse - * @property {Array.|null} [events] ListEventsResponse events - * @property {string|null} [nextPageToken] ListEventsResponse nextPageToken - * @property {Array.|null} [unreachable] ListEventsResponse unreachable + * @interface IDeleteEventRequest + * @property {string|null} [name] DeleteEventRequest name + * @property {string|null} [requestId] DeleteEventRequest requestId */ /** - * Constructs a new ListEventsResponse. + * Constructs a new DeleteEventRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ListEventsResponse. - * @implements IListEventsResponse + * @classdesc Represents a DeleteEventRequest. + * @implements IDeleteEventRequest * @constructor - * @param {google.cloud.video.livestream.v1.IListEventsResponse=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest=} [properties] Properties to set */ - function ListEventsResponse(properties) { - this.events = []; - this.unreachable = []; + function DeleteEventRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17323,109 +21054,89 @@ } /** - * ListEventsResponse events. - * @member {Array.} events - * @memberof google.cloud.video.livestream.v1.ListEventsResponse - * @instance - */ - ListEventsResponse.prototype.events = $util.emptyArray; - - /** - * ListEventsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * DeleteEventRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @instance */ - ListEventsResponse.prototype.nextPageToken = ""; + DeleteEventRequest.prototype.name = ""; /** - * ListEventsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * DeleteEventRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @instance */ - ListEventsResponse.prototype.unreachable = $util.emptyArray; + DeleteEventRequest.prototype.requestId = ""; /** - * Creates a new ListEventsResponse instance using the specified properties. + * Creates a new DeleteEventRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsResponse=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse instance + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest instance */ - ListEventsResponse.create = function create(properties) { - return new ListEventsResponse(properties); + DeleteEventRequest.create = function create(properties) { + return new DeleteEventRequest(properties); }; /** - * Encodes the specified ListEventsResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsResponse.verify|verify} messages. + * Encodes the specified DeleteEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteEventRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsResponse} message ListEventsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} message DeleteEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEventsResponse.encode = function encode(message, writer) { + DeleteEventRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.google.cloud.video.livestream.v1.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified ListEventsResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ListEventsResponse.verify|verify} messages. + * Encodes the specified DeleteEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteEventRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static - * @param {google.cloud.video.livestream.v1.IListEventsResponse} message ListEventsResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} message DeleteEventRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEventRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEventsResponse message from the specified reader or buffer. + * Decodes a DeleteEventRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse + * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEventsResponse.decode = function decode(reader, length) { + DeleteEventRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ListEventsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteEventRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.google.cloud.video.livestream.v1.Event.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.requestId = reader.string(); break; } default: @@ -17437,169 +21148,130 @@ }; /** - * Decodes a ListEventsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteEventRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse + * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEventsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteEventRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEventsResponse message. + * Verifies a DeleteEventRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEventsResponse.verify = function verify(message) { + DeleteEventRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.google.cloud.video.livestream.v1.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEventRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ListEventsResponse} ListEventsResponse + * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest */ - ListEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ListEventsResponse) + DeleteEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.DeleteEventRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.ListEventsResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.events: object expected"); - message.events[i] = $root.google.cloud.video.livestream.v1.Event.fromObject(object.events[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.video.livestream.v1.ListEventsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.video.livestream.v1.DeleteEventRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListEventsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEventRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static - * @param {google.cloud.video.livestream.v1.ListEventsResponse} message ListEventsResponse + * @param {google.cloud.video.livestream.v1.DeleteEventRequest} message DeleteEventRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEventsResponse.toObject = function toObject(message, options) { + DeleteEventRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.events = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.google.cloud.video.livestream.v1.Event.toObject(message.events[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.requestId = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListEventsResponse to JSON. + * Converts this DeleteEventRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @instance * @returns {Object.} JSON object */ - ListEventsResponse.prototype.toJSON = function toJSON() { + DeleteEventRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEventsResponse + * Gets the default type url for DeleteEventRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ListEventsResponse + * @memberof google.cloud.video.livestream.v1.DeleteEventRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ListEventsResponse"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteEventRequest"; }; - return ListEventsResponse; + return DeleteEventRequest; })(); - v1.GetEventRequest = (function() { + v1.ChannelOperationResponse = (function() { /** - * Properties of a GetEventRequest. + * Properties of a ChannelOperationResponse. * @memberof google.cloud.video.livestream.v1 - * @interface IGetEventRequest - * @property {string|null} [name] GetEventRequest name + * @interface IChannelOperationResponse */ /** - * Constructs a new GetEventRequest. + * Constructs a new ChannelOperationResponse. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a GetEventRequest. - * @implements IGetEventRequest + * @classdesc Represents a ChannelOperationResponse. + * @implements IChannelOperationResponse * @constructor - * @param {google.cloud.video.livestream.v1.IGetEventRequest=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IChannelOperationResponse=} [properties] Properties to set */ - function GetEventRequest(properties) { + function ChannelOperationResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17607,77 +21279,63 @@ } /** - * GetEventRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.GetEventRequest - * @instance - */ - GetEventRequest.prototype.name = ""; - - /** - * Creates a new GetEventRequest instance using the specified properties. + * Creates a new ChannelOperationResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static - * @param {google.cloud.video.livestream.v1.IGetEventRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest instance + * @param {google.cloud.video.livestream.v1.IChannelOperationResponse=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse instance */ - GetEventRequest.create = function create(properties) { - return new GetEventRequest(properties); + ChannelOperationResponse.create = function create(properties) { + return new ChannelOperationResponse(properties); }; /** - * Encodes the specified GetEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetEventRequest.verify|verify} messages. + * Encodes the specified ChannelOperationResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ChannelOperationResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static - * @param {google.cloud.video.livestream.v1.IGetEventRequest} message GetEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IChannelOperationResponse} message ChannelOperationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEventRequest.encode = function encode(message, writer) { + ChannelOperationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GetEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetEventRequest.verify|verify} messages. + * Encodes the specified ChannelOperationResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ChannelOperationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static - * @param {google.cloud.video.livestream.v1.IGetEventRequest} message GetEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IChannelOperationResponse} message ChannelOperationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + ChannelOperationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEventRequest message from the specified reader or buffer. + * Decodes a ChannelOperationResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest + * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEventRequest.decode = function decode(reader, length) { + ChannelOperationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetEventRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ChannelOperationResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -17687,213 +21345,260 @@ }; /** - * Decodes a GetEventRequest message from the specified reader or buffer, length delimited. + * Decodes a ChannelOperationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest + * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEventRequest.decodeDelimited = function decodeDelimited(reader) { + ChannelOperationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEventRequest message. + * Verifies a ChannelOperationResponse message. * @function verify - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEventRequest.verify = function verify(message) { + ChannelOperationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; return null; }; /** - * Creates a GetEventRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelOperationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.GetEventRequest} GetEventRequest + * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse */ - GetEventRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.GetEventRequest) + ChannelOperationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.ChannelOperationResponse) return object; - var message = new $root.google.cloud.video.livestream.v1.GetEventRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.video.livestream.v1.ChannelOperationResponse(); }; /** - * Creates a plain object from a GetEventRequest message. Also converts values to other types if specified. + * Creates a plain object from a ChannelOperationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static - * @param {google.cloud.video.livestream.v1.GetEventRequest} message GetEventRequest + * @param {google.cloud.video.livestream.v1.ChannelOperationResponse} message ChannelOperationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEventRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; + ChannelOperationResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetEventRequest to JSON. + * Converts this ChannelOperationResponse to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @instance * @returns {Object.} JSON object */ - GetEventRequest.prototype.toJSON = function toJSON() { + ChannelOperationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEventRequest + * Gets the default type url for ChannelOperationResponse * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.GetEventRequest + * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChannelOperationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetEventRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.ChannelOperationResponse"; }; - return GetEventRequest; + return ChannelOperationResponse; })(); - v1.DeleteEventRequest = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a DeleteEventRequest. + * Properties of an OperationMetadata. * @memberof google.cloud.video.livestream.v1 - * @interface IDeleteEventRequest - * @property {string|null} [name] DeleteEventRequest name - * @property {string|null} [requestId] DeleteEventRequest requestId + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.video.livestream.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.video.livestream.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @instance */ + OperationMetadata.prototype.target = ""; /** - * Constructs a new DeleteEventRequest. - * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a DeleteEventRequest. - * @implements IDeleteEventRequest - * @constructor - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest=} [properties] Properties to set + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @instance */ - function DeleteEventRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + OperationMetadata.prototype.verb = ""; /** - * DeleteEventRequest name. - * @member {string} name - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @instance */ - DeleteEventRequest.prototype.name = ""; + OperationMetadata.prototype.requestedCancellation = false; /** - * DeleteEventRequest requestId. - * @member {string} requestId - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @instance */ - DeleteEventRequest.prototype.requestId = ""; + OperationMetadata.prototype.apiVersion = ""; /** - * Creates a new DeleteEventRequest instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest instance + * @param {google.cloud.video.livestream.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata instance */ - DeleteEventRequest.create = function create(properties) { - return new DeleteEventRequest(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified DeleteEventRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteEventRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.video.livestream.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} message DeleteEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEventRequest.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.apiVersion); return writer; }; /** - * Encodes the specified DeleteEventRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.DeleteEventRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static - * @param {google.cloud.video.livestream.v1.IDeleteEventRequest} message DeleteEventRequest message or plain object to encode + * @param {google.cloud.video.livestream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEventRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest + * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEventRequest.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.DeleteEventRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.requestId = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.requestedCancellation = reader.bool(); + break; + } + case 6: { + message.apiVersion = reader.string(); break; } default: @@ -17905,130 +21610,173 @@ }; /** - * Decodes a DeleteEventRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest + * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEventRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEventRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEventRequest.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a DeleteEventRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.DeleteEventRequest} DeleteEventRequest + * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata */ - DeleteEventRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.DeleteEventRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.OperationMetadata) return object; - var message = new $root.google.cloud.video.livestream.v1.DeleteEventRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.video.livestream.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.video.livestream.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a DeleteEventRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static - * @param {google.cloud.video.livestream.v1.DeleteEventRequest} message DeleteEventRequest + * @param {google.cloud.video.livestream.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEventRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.requestId = ""; + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this DeleteEventRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - DeleteEventRequest.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEventRequest + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.DeleteEventRequest + * @memberof google.cloud.video.livestream.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.DeleteEventRequest"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.OperationMetadata"; }; - return DeleteEventRequest; + return OperationMetadata; })(); - v1.ChannelOperationResponse = (function() { + v1.GetPoolRequest = (function() { /** - * Properties of a ChannelOperationResponse. + * Properties of a GetPoolRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IChannelOperationResponse + * @interface IGetPoolRequest + * @property {string|null} [name] GetPoolRequest name */ /** - * Constructs a new ChannelOperationResponse. + * Constructs a new GetPoolRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents a ChannelOperationResponse. - * @implements IChannelOperationResponse + * @classdesc Represents a GetPoolRequest. + * @implements IGetPoolRequest * @constructor - * @param {google.cloud.video.livestream.v1.IChannelOperationResponse=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IGetPoolRequest=} [properties] Properties to set */ - function ChannelOperationResponse(properties) { + function GetPoolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18036,63 +21784,77 @@ } /** - * Creates a new ChannelOperationResponse instance using the specified properties. + * GetPoolRequest name. + * @member {string} name + * @memberof google.cloud.video.livestream.v1.GetPoolRequest + * @instance + */ + GetPoolRequest.prototype.name = ""; + + /** + * Creates a new GetPoolRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static - * @param {google.cloud.video.livestream.v1.IChannelOperationResponse=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse instance + * @param {google.cloud.video.livestream.v1.IGetPoolRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.GetPoolRequest} GetPoolRequest instance */ - ChannelOperationResponse.create = function create(properties) { - return new ChannelOperationResponse(properties); + GetPoolRequest.create = function create(properties) { + return new GetPoolRequest(properties); }; /** - * Encodes the specified ChannelOperationResponse message. Does not implicitly {@link google.cloud.video.livestream.v1.ChannelOperationResponse.verify|verify} messages. + * Encodes the specified GetPoolRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.GetPoolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static - * @param {google.cloud.video.livestream.v1.IChannelOperationResponse} message ChannelOperationResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetPoolRequest} message GetPoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChannelOperationResponse.encode = function encode(message, writer) { + GetPoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ChannelOperationResponse message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.ChannelOperationResponse.verify|verify} messages. + * Encodes the specified GetPoolRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.GetPoolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static - * @param {google.cloud.video.livestream.v1.IChannelOperationResponse} message ChannelOperationResponse message or plain object to encode + * @param {google.cloud.video.livestream.v1.IGetPoolRequest} message GetPoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChannelOperationResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChannelOperationResponse message from the specified reader or buffer. + * Decodes a GetPoolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse + * @returns {google.cloud.video.livestream.v1.GetPoolRequest} GetPoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChannelOperationResponse.decode = function decode(reader, length) { + GetPoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.ChannelOperationResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.GetPoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18102,114 +21864,124 @@ }; /** - * Decodes a ChannelOperationResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse + * @returns {google.cloud.video.livestream.v1.GetPoolRequest} GetPoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChannelOperationResponse.decodeDelimited = function decodeDelimited(reader) { + GetPoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChannelOperationResponse message. + * Verifies a GetPoolRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChannelOperationResponse.verify = function verify(message) { + GetPoolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ChannelOperationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.ChannelOperationResponse} ChannelOperationResponse + * @returns {google.cloud.video.livestream.v1.GetPoolRequest} GetPoolRequest */ - ChannelOperationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.ChannelOperationResponse) + GetPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.GetPoolRequest) return object; - return new $root.google.cloud.video.livestream.v1.ChannelOperationResponse(); + var message = new $root.google.cloud.video.livestream.v1.GetPoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a ChannelOperationResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetPoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static - * @param {google.cloud.video.livestream.v1.ChannelOperationResponse} message ChannelOperationResponse + * @param {google.cloud.video.livestream.v1.GetPoolRequest} message GetPoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChannelOperationResponse.toObject = function toObject() { - return {}; + GetPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; }; /** - * Converts this ChannelOperationResponse to JSON. + * Converts this GetPoolRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @instance * @returns {Object.} JSON object */ - ChannelOperationResponse.prototype.toJSON = function toJSON() { + GetPoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChannelOperationResponse + * Gets the default type url for GetPoolRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.ChannelOperationResponse + * @memberof google.cloud.video.livestream.v1.GetPoolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChannelOperationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.ChannelOperationResponse"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.GetPoolRequest"; }; - return ChannelOperationResponse; + return GetPoolRequest; })(); - v1.OperationMetadata = (function() { + v1.UpdatePoolRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of an UpdatePoolRequest. * @memberof google.cloud.video.livestream.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IUpdatePoolRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePoolRequest updateMask + * @property {google.cloud.video.livestream.v1.IPool|null} [pool] UpdatePoolRequest pool + * @property {string|null} [requestId] UpdatePoolRequest requestId */ /** - * Constructs a new OperationMetadata. + * Constructs a new UpdatePoolRequest. * @memberof google.cloud.video.livestream.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents an UpdatePoolRequest. + * @implements IUpdatePoolRequest * @constructor - * @param {google.cloud.video.livestream.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function UpdatePoolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18217,145 +21989,103 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.video.livestream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.video.livestream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.video.livestream.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * UpdatePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @instance */ - OperationMetadata.prototype.verb = ""; + UpdatePoolRequest.prototype.updateMask = null; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * UpdatePoolRequest pool. + * @member {google.cloud.video.livestream.v1.IPool|null|undefined} pool + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + UpdatePoolRequest.prototype.pool = null; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * UpdatePoolRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + UpdatePoolRequest.prototype.requestId = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new UpdatePoolRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static - * @param {google.cloud.video.livestream.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest=} [properties] Properties to set + * @returns {google.cloud.video.livestream.v1.UpdatePoolRequest} UpdatePoolRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + UpdatePoolRequest.create = function create(properties) { + return new UpdatePoolRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.video.livestream.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified UpdatePoolRequest message. Does not implicitly {@link google.cloud.video.livestream.v1.UpdatePoolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static - * @param {google.cloud.video.livestream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest} message UpdatePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + UpdatePoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.apiVersion); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pool != null && Object.hasOwnProperty.call(message, "pool")) + $root.google.cloud.video.livestream.v1.Pool.encode(message.pool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified UpdatePoolRequest message, length delimited. Does not implicitly {@link google.cloud.video.livestream.v1.UpdatePoolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static - * @param {google.cloud.video.livestream.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.video.livestream.v1.IUpdatePoolRequest} message UpdatePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an UpdatePoolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.video.livestream.v1.UpdatePoolRequest} UpdatePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + UpdatePoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.livestream.v1.UpdatePoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pool = $root.google.cloud.video.livestream.v1.Pool.decode(reader, reader.uint32()); break; } case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.requestedCancellation = reader.bool(); - break; - } - case 6: { - message.apiVersion = reader.string(); + message.requestId = reader.string(); break; } default: @@ -18367,153 +22097,129 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdatePoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.video.livestream.v1.UpdatePoolRequest} UpdatePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdatePoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies an UpdatePoolRequest message. * @function verify - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + UpdatePoolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "createTime." + error; + return "updateMask." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.pool != null && message.hasOwnProperty("pool")) { + var error = $root.google.cloud.video.livestream.v1.Pool.verify(message.pool); if (error) - return "endTime." + error; + return "pool." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.livestream.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.video.livestream.v1.UpdatePoolRequest} UpdatePoolRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.livestream.v1.OperationMetadata) + UpdatePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.livestream.v1.UpdatePoolRequest) return object; - var message = new $root.google.cloud.video.livestream.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.video.livestream.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.video.livestream.v1.UpdatePoolRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdatePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.video.livestream.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.pool != null) { + if (typeof object.pool !== "object") + throw TypeError(".google.cloud.video.livestream.v1.UpdatePoolRequest.pool: object expected"); + message.pool = $root.google.cloud.video.livestream.v1.Pool.fromObject(object.pool); } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static - * @param {google.cloud.video.livestream.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.video.livestream.v1.UpdatePoolRequest} message UpdatePoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + UpdatePoolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.updateMask = null; + object.pool = null; + object.requestId = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.pool != null && message.hasOwnProperty("pool")) + object.pool = $root.google.cloud.video.livestream.v1.Pool.toObject(message.pool, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this UpdatePoolRequest to JSON. * @function toJSON - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + UpdatePoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for UpdatePoolRequest * @function getTypeUrl - * @memberof google.cloud.video.livestream.v1.OperationMetadata + * @memberof google.cloud.video.livestream.v1.UpdatePoolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdatePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.livestream.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.video.livestream.v1.UpdatePoolRequest"; }; - return OperationMetadata; + return UpdatePoolRequest; })(); return v1; diff --git a/packages/google-cloud-video-livestream/protos/protos.json b/packages/google-cloud-video-livestream/protos/protos.json index 4d288b354c8..8c294527d20 100644 --- a/packages/google-cloud-video-livestream/protos/protos.json +++ b/packages/google-cloud-video-livestream/protos/protos.json @@ -17,8 +17,8 @@ "java_package": "com.google.cloud.video.livestream.v1", "php_namespace": "Google\\Cloud\\Video\\LiveStream\\V1", "ruby_package": "Google::Cloud::Video::LiveStream::V1", - "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", - "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{version}" + "(google.api.resource_definition).type": "compute.googleapis.com/Network", + "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" }, "nested": { "ElementaryStream": { @@ -819,6 +819,7 @@ "inputSwitch", "adBreak", "returnToProgram", + "slate", "mute", "unmute" ] @@ -850,38 +851,27 @@ }, "inputSwitch": { "type": "InputSwitchTask", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 5 }, "adBreak": { "type": "AdBreakTask", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 6 }, "returnToProgram": { "type": "ReturnToProgramTask", - "id": 13, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 13 + }, + "slate": { + "type": "SlateTask", + "id": 14 }, "mute": { "type": "MuteTask", - "id": 15, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 15 }, "unmute": { "type": "UnmuteTask", - "id": 16, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 16 }, "executeNow": { "type": "bool", @@ -923,6 +913,21 @@ } } }, + "SlateTask": { + "fields": { + "duration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "asset": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "livestream.googleapis.com/Asset" + } + } + } + }, "ReturnToProgramTask": { "fields": {} }, @@ -950,6 +955,98 @@ } } }, + "Asset": { + "options": { + "(google.api.resource).type": "livestream.googleapis.com/Asset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/assets/{asset}" + }, + "oneofs": { + "resource": { + "oneof": [ + "video", + "image" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "video": { + "type": "VideoAsset", + "id": 5 + }, + "image": { + "type": "ImageAsset", + "id": 6 + }, + "crc32c": { + "type": "string", + "id": 7 + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "error": { + "type": "google.rpc.Status", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "VideoAsset": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "ImageAsset": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, "Encryption": { "oneofs": { "secretSource": { @@ -1061,6 +1158,54 @@ } } }, + "Pool": { + "options": { + "(google.api.resource).type": "livestream.googleapis.com/Pool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/pools/{pool}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 5 + } + }, + "nested": { + "NetworkConfig": { + "fields": { + "peeredNetwork": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + } + } + } + } + }, "LivestreamService": { "options": { "(google.api.default_host)": "livestream.googleapis.com", @@ -1432,6 +1577,246 @@ "(google.api.method_signature)": "name" } ] + }, + "CreateAsset": { + "requestType": "CreateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/assets", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "parent,asset,asset_id", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/assets", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "parent,asset,asset_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAsset": { + "requestType": "DeleteAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/assets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetAsset": { + "requestType": "GetAssetRequest", + "responseType": "Asset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/assets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAssets": { + "requestType": "ListAssetsRequest", + "responseType": "ListAssetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/assets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/assets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPool": { + "requestType": "GetPoolRequest", + "responseType": "Pool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/pools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/pools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdatePool": { + "requestType": "UpdatePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{pool.name=projects/*/locations/*/pools/*}", + "(google.api.http).body": "pool", + "(google.api.method_signature)": "pool,update_mask", + "(google.longrunning.operation_info).response_type": "Pool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{pool.name=projects/*/locations/*/pools/*}", + "body": "pool" + } + }, + { + "(google.api.method_signature)": "pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Pool", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "CreateAssetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "livestream.googleapis.com/Asset" + } + }, + "asset": { + "type": "Asset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "assetId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4 + } + } + }, + "DeleteAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "livestream.googleapis.com/Asset" + } + }, + "requestId": { + "type": "string", + "id": 2 + } + } + }, + "ListAssetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "livestream.googleapis.com/Asset" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListAssetsResponse": { + "fields": { + "assets": { + "rule": "repeated", + "type": "Asset", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "livestream.googleapis.com/Asset" + } } } }, @@ -1869,6 +2254,37 @@ } } } + }, + "GetPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "livestream.googleapis.com/Pool" + } + } + } + }, + "UpdatePoolRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1 + }, + "pool": { + "type": "Pool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3 + } + } } } } diff --git a/packages/google-cloud-video-livestream/samples/README.md b/packages/google-cloud-video-livestream/samples/README.md index d0b8e9e381c..dfb01bb65ec 100644 --- a/packages/google-cloud-video-livestream/samples/README.md +++ b/packages/google-cloud-video-livestream/samples/README.md @@ -12,15 +12,20 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Livestream_service.create_asset](#livestream_service.create_asset) * [Livestream_service.create_channel](#livestream_service.create_channel) * [Livestream_service.create_event](#livestream_service.create_event) * [Livestream_service.create_input](#livestream_service.create_input) + * [Livestream_service.delete_asset](#livestream_service.delete_asset) * [Livestream_service.delete_channel](#livestream_service.delete_channel) * [Livestream_service.delete_event](#livestream_service.delete_event) * [Livestream_service.delete_input](#livestream_service.delete_input) + * [Livestream_service.get_asset](#livestream_service.get_asset) * [Livestream_service.get_channel](#livestream_service.get_channel) * [Livestream_service.get_event](#livestream_service.get_event) * [Livestream_service.get_input](#livestream_service.get_input) + * [Livestream_service.get_pool](#livestream_service.get_pool) + * [Livestream_service.list_assets](#livestream_service.list_assets) * [Livestream_service.list_channels](#livestream_service.list_channels) * [Livestream_service.list_events](#livestream_service.list_events) * [Livestream_service.list_inputs](#livestream_service.list_inputs) @@ -28,7 +33,7 @@ * [Livestream_service.stop_channel](#livestream_service.stop_channel) * [Livestream_service.update_channel](#livestream_service.update_channel) * [Livestream_service.update_input](#livestream_service.update_input) - * [Quickstart](#quickstart) + * [Livestream_service.update_pool](#livestream_service.update_pool) * [Quickstart](#quickstart) ## Before you begin @@ -46,6 +51,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Livestream_service.create_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js` + + +----- + + + + ### Livestream_service.create_channel View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_channel.js). @@ -97,6 +119,23 @@ __Usage:__ +### Livestream_service.delete_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js` + + +----- + + + + ### Livestream_service.delete_channel View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_channel.js). @@ -148,6 +187,23 @@ __Usage:__ +### Livestream_service.get_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js` + + +----- + + + + ### Livestream_service.get_channel View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_channel.js). @@ -199,6 +255,40 @@ __Usage:__ +### Livestream_service.get_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js` + + +----- + + + + +### Livestream_service.list_assets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js` + + +----- + + + + ### Livestream_service.list_channels View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_channels.js). @@ -318,16 +408,16 @@ __Usage:__ -### Quickstart +### Livestream_service.update_pool -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js,samples/README.md) __Usage:__ -`node packages/google-cloud-video-livestream/samples/quickstart.js` +`node packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js` ----- @@ -337,14 +427,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/test/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-livestream/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/test/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-livestream/samples/quickstart.js,samples/README.md) __Usage:__ -`node packages/google-cloud-video-livestream/samples/test/quickstart.js` +`node packages/google-cloud-video-livestream/samples/quickstart.js` diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js new file mode 100644 index 00000000000..c2d0795bb2c --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.create_asset.js @@ -0,0 +1,89 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, asset, assetId) { + // [START livestream_v1_generated_LivestreamService_CreateAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. The asset resource to be created. + */ + // const asset = {} + /** + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + */ + // const assetId = 'abc123' + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + */ + // const requestId = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callCreateAsset() { + // Construct request + const request = { + parent, + asset, + assetId, + }; + + // Run request + const [operation] = await livestreamClient.createAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAsset(); + // [END livestream_v1_generated_LivestreamService_CreateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js new file mode 100644 index 00000000000..a53149eb5c1 --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.delete_asset.js @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START livestream_v1_generated_LivestreamService_DeleteAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the asset resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + */ + // const name = 'abc123' + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + */ + // const requestId = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callDeleteAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await livestreamClient.deleteAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAsset(); + // [END livestream_v1_generated_LivestreamService_DeleteAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js new file mode 100644 index 00000000000..b8b8a2de9eb --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_asset.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START livestream_v1_generated_LivestreamService_GetAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/assets/{asset}`. + */ + // const name = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callGetAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await livestreamClient.getAsset(request); + console.log(response); + } + + callGetAsset(); + // [END livestream_v1_generated_LivestreamService_GetAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js new file mode 100644 index 00000000000..4cf98affd8b --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.get_pool.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START livestream_v1_generated_LivestreamService_GetPool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + */ + // const name = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callGetPool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await livestreamClient.getPool(request); + console.log(response); + } + + callGetPool(); + // [END livestream_v1_generated_LivestreamService_GetPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js new file mode 100644 index 00000000000..76b40bdfa17 --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.list_assets.js @@ -0,0 +1,81 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START livestream_v1_generated_LivestreamService_ListAssets_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callListAssets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await livestreamClient.listAssetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssets(); + // [END livestream_v1_generated_LivestreamService_ListAssets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js new file mode 100644 index 00000000000..43b395daa76 --- /dev/null +++ b/packages/google-cloud-video-livestream/samples/generated/v1/livestream_service.update_pool.js @@ -0,0 +1,84 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(pool) { + // [START livestream_v1_generated_LivestreamService_UpdatePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * * `networkConfig` + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + */ + // const updateMask = {} + /** + * Required. The pool resource to be updated. + */ + // const pool = {} + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + */ + // const requestId = 'abc123' + + // Imports the Livestream library + const {LivestreamServiceClient} = require('@google-cloud/livestream').v1; + + // Instantiates a client + const livestreamClient = new LivestreamServiceClient(); + + async function callUpdatePool() { + // Construct request + const request = { + pool, + }; + + // Run request + const [operation] = await livestreamClient.updatePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdatePool(); + // [END livestream_v1_generated_LivestreamService_UpdatePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json index eed1ac3e400..7296e3bbdcc 100644 --- a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json +++ b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-livestream", - "version": "0.5.0", + "version": "0.5.1", "language": "TYPESCRIPT", "apis": [ { @@ -774,6 +774,286 @@ } } } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_CreateAsset_async", + "title": "LivestreamService createAsset Sample", + "origin": "API_DEFINITION", + "description": " Creates a Asset with the provided unique ID in the specified region.", + "canonical": true, + "file": "livestream_service.create_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.CreateAsset", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "asset", + "type": ".google.cloud.video.livestream.v1.Asset" + }, + { + "name": "asset_id", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "CreateAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.CreateAsset", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_DeleteAsset_async", + "title": "LivestreamService deleteAsset Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified asset if it is not used.", + "canonical": true, + "file": "livestream_service.delete_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.DeleteAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.DeleteAsset", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_GetAsset_async", + "title": "LivestreamService getAsset Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified asset.", + "canonical": true, + "file": "livestream_service.get_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.GetAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.livestream.v1.Asset", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "GetAsset", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.GetAsset", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_ListAssets_async", + "title": "LivestreamService listAssets Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of all assets in the specified region.", + "canonical": true, + "file": "livestream_service.list_assets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssets", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.ListAssets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.livestream.v1.ListAssetsResponse", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "ListAssets", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.ListAssets", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_GetPool_async", + "title": "LivestreamService getPool Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified pool.", + "canonical": true, + "file": "livestream_service.get_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPool", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.GetPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.livestream.v1.Pool", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "GetPool", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.GetPool", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } + }, + { + "regionTag": "livestream_v1_generated_LivestreamService_UpdatePool_async", + "title": "LivestreamService updatePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified pool.", + "canonical": true, + "file": "livestream_service.update_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePool", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.UpdatePool", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "pool", + "type": ".google.cloud.video.livestream.v1.Pool" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LivestreamServiceClient", + "fullName": "google.cloud.video.livestream.v1.LivestreamServiceClient" + }, + "method": { + "shortName": "UpdatePool", + "fullName": "google.cloud.video.livestream.v1.LivestreamService.UpdatePool", + "service": { + "shortName": "LivestreamService", + "fullName": "google.cloud.video.livestream.v1.LivestreamService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-video-livestream/src/v1/gapic_metadata.json b/packages/google-cloud-video-livestream/src/v1/gapic_metadata.json index 7e4e701773a..a17f4a6a85d 100644 --- a/packages/google-cloud-video-livestream/src/v1/gapic_metadata.json +++ b/packages/google-cloud-video-livestream/src/v1/gapic_metadata.json @@ -35,6 +35,16 @@ "deleteEvent" ] }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetPool": { + "methods": [ + "getPool" + ] + }, "CreateChannel": { "methods": [ "createChannel" @@ -75,6 +85,21 @@ "updateInput" ] }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "UpdatePool": { + "methods": [ + "updatePool" + ] + }, "ListChannels": { "methods": [ "listChannels", @@ -95,6 +120,13 @@ "listEventsStream", "listEventsAsync" ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] } } }, @@ -126,6 +158,16 @@ "deleteEvent" ] }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetPool": { + "methods": [ + "getPool" + ] + }, "CreateChannel": { "methods": [ "createChannel" @@ -166,6 +208,21 @@ "updateInput" ] }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "UpdatePool": { + "methods": [ + "updatePool" + ] + }, "ListChannels": { "methods": [ "listChannels", @@ -186,6 +243,13 @@ "listEventsStream", "listEventsAsync" ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] } } } diff --git a/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts b/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts index 80996dcef9c..0c47dd92c06 100644 --- a/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts +++ b/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts @@ -192,6 +192,9 @@ export class LivestreamServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/assets/{asset}' + ), channelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/channels/{channel}' ), @@ -204,6 +207,9 @@ export class LivestreamServiceClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + poolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pools/{pool}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -228,6 +234,11 @@ export class LivestreamServiceClient { 'nextPageToken', 'events' ), + listAssets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'assets' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -319,6 +330,24 @@ export class LivestreamServiceClient { const updateInputMetadata = protoFilesRoot.lookup( '.google.cloud.video.livestream.v1.OperationMetadata' ) as gax.protobuf.Type; + const createAssetResponse = protoFilesRoot.lookup( + '.google.cloud.video.livestream.v1.Asset' + ) as gax.protobuf.Type; + const createAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.video.livestream.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteAssetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.video.livestream.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updatePoolResponse = protoFilesRoot.lookup( + '.google.cloud.video.livestream.v1.Pool' + ) as gax.protobuf.Type; + const updatePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.video.livestream.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createChannel: new this._gaxModule.LongrunningDescriptor( @@ -361,6 +390,21 @@ export class LivestreamServiceClient { updateInputResponse.decode.bind(updateInputResponse), updateInputMetadata.decode.bind(updateInputMetadata) ), + createAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAssetResponse.decode.bind(createAssetResponse), + createAssetMetadata.decode.bind(createAssetMetadata) + ), + deleteAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAssetResponse.decode.bind(deleteAssetResponse), + deleteAssetMetadata.decode.bind(deleteAssetMetadata) + ), + updatePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updatePoolResponse.decode.bind(updatePoolResponse), + updatePoolMetadata.decode.bind(updatePoolMetadata) + ), }; // Put together the default options sent with requests. @@ -430,6 +474,12 @@ export class LivestreamServiceClient { 'listEvents', 'getEvent', 'deleteEvent', + 'createAsset', + 'deleteAsset', + 'getAsset', + 'listAssets', + 'getPool', + 'updatePool', ]; for (const methodName of livestreamServiceStubMethods) { const callPromise = this.livestreamServiceStub.then( @@ -1010,6 +1060,190 @@ export class LivestreamServiceClient { this.initialize(); return this.innerApiCalls.deleteEvent(request, options, callback); } + /** + * Returns the specified asset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/assets/{asset}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.video.livestream.v1.Asset | Asset}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.get_asset.js + * region_tag:livestream_v1_generated_LivestreamService_GetAsset_async + */ + getAsset( + request?: protos.google.cloud.video.livestream.v1.IGetAssetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IGetAssetRequest | undefined, + {} | undefined + ] + >; + getAsset( + request: protos.google.cloud.video.livestream.v1.IGetAssetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.livestream.v1.IAsset, + | protos.google.cloud.video.livestream.v1.IGetAssetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAsset( + request: protos.google.cloud.video.livestream.v1.IGetAssetRequest, + callback: Callback< + protos.google.cloud.video.livestream.v1.IAsset, + | protos.google.cloud.video.livestream.v1.IGetAssetRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAsset( + request?: protos.google.cloud.video.livestream.v1.IGetAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.livestream.v1.IAsset, + | protos.google.cloud.video.livestream.v1.IGetAssetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.livestream.v1.IAsset, + | protos.google.cloud.video.livestream.v1.IGetAssetRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IGetAssetRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAsset(request, options, callback); + } + /** + * Returns the specified pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.video.livestream.v1.Pool | Pool}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.get_pool.js + * region_tag:livestream_v1_generated_LivestreamService_GetPool_async + */ + getPool( + request?: protos.google.cloud.video.livestream.v1.IGetPoolRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IGetPoolRequest | undefined, + {} | undefined + ] + >; + getPool( + request: protos.google.cloud.video.livestream.v1.IGetPoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.livestream.v1.IPool, + | protos.google.cloud.video.livestream.v1.IGetPoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPool( + request: protos.google.cloud.video.livestream.v1.IGetPoolRequest, + callback: Callback< + protos.google.cloud.video.livestream.v1.IPool, + | protos.google.cloud.video.livestream.v1.IGetPoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPool( + request?: protos.google.cloud.video.livestream.v1.IGetPoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.livestream.v1.IPool, + | protos.google.cloud.video.livestream.v1.IGetPoolRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.livestream.v1.IPool, + | protos.google.cloud.video.livestream.v1.IGetPoolRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IGetPoolRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getPool(request, options, callback); + } /** * Creates a channel with the provided unique ID in the specified @@ -2288,92 +2522,565 @@ export class LivestreamServiceClient { >; } /** - * Returns a list of all channels in the specified region. + * Creates a Asset with the provided unique ID in the specified + * region. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent location for the resource, in the form of: * `projects/{project}/locations/{location}`. - * @param {number} request.pageSize - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * {@link google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token|next_page_token} - * to determine if there are more items left to be queried. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {string} request.filter - * The filter to apply to list results. - * @param {string} request.orderBy - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @param {google.cloud.video.livestream.v1.Asset} request.asset + * Required. The asset resource to be created. + * @param {string} request.assetId + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @param {string} request.requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link google.cloud.video.livestream.v1.Channel | Channel}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listChannelsAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. + * @example include:samples/generated/v1/livestream_service.create_asset.js + * region_tag:livestream_v1_generated_LivestreamService_CreateAsset_async */ - listChannels( - request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + createAsset( + request?: protos.google.cloud.video.livestream.v1.ICreateAssetRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.livestream.v1.IChannel[], - protos.google.cloud.video.livestream.v1.IListChannelsRequest | null, - protos.google.cloud.video.livestream.v1.IListChannelsResponse + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined ] >; - listChannels( - request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + createAsset( + request: protos.google.cloud.video.livestream.v1.ICreateAssetRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.livestream.v1.IListChannelsRequest, - | protos.google.cloud.video.livestream.v1.IListChannelsResponse - | null - | undefined, - protos.google.cloud.video.livestream.v1.IChannel + callback: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listChannels( - request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, - callback: PaginationCallback< - protos.google.cloud.video.livestream.v1.IListChannelsRequest, - | protos.google.cloud.video.livestream.v1.IListChannelsResponse - | null - | undefined, - protos.google.cloud.video.livestream.v1.IChannel + createAsset( + request: protos.google.cloud.video.livestream.v1.ICreateAssetRequest, + callback: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listChannels( - request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + createAsset( + request?: protos.google.cloud.video.livestream.v1.ICreateAssetRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.cloud.video.livestream.v1.IListChannelsRequest, - | protos.google.cloud.video.livestream.v1.IListChannelsResponse - | null - | undefined, - protos.google.cloud.video.livestream.v1.IChannel + | Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.cloud.video.livestream.v1.IListChannelsRequest, - | protos.google.cloud.video.livestream.v1.IListChannelsResponse - | null - | undefined, - protos.google.cloud.video.livestream.v1.IChannel - > - ): Promise< - [ - protos.google.cloud.video.livestream.v1.IChannel[], - protos.google.cloud.video.livestream.v1.IListChannelsRequest | null, + callback?: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.create_asset.js + * region_tag:livestream_v1_generated_LivestreamService_CreateAsset_async + */ + async checkCreateAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.livestream.v1.Asset, + protos.google.cloud.video.livestream.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAsset, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.livestream.v1.Asset, + protos.google.cloud.video.livestream.v1.OperationMetadata + >; + } + /** + * Deletes the specified asset if it is not used. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the asset resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * @param {string} request.requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.delete_asset.js + * region_tag:livestream_v1_generated_LivestreamService_DeleteAsset_async + */ + deleteAsset( + request?: protos.google.cloud.video.livestream.v1.IDeleteAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteAsset( + request: protos.google.cloud.video.livestream.v1.IDeleteAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request: protos.google.cloud.video.livestream.v1.IDeleteAssetRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request?: protos.google.cloud.video.livestream.v1.IDeleteAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.delete_asset.js + * region_tag:livestream_v1_generated_LivestreamService_DeleteAsset_async + */ + async checkDeleteAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.livestream.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteAsset, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.livestream.v1.OperationMetadata + >; + } + /** + * Updates the specified pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * + * * `networkConfig` + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * @param {google.cloud.video.livestream.v1.Pool} request.pool + * Required. The pool resource to be updated. + * @param {string} request.requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.update_pool.js + * region_tag:livestream_v1_generated_LivestreamService_UpdatePool_async + */ + updatePool( + request?: protos.google.cloud.video.livestream.v1.IUpdatePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updatePool( + request: protos.google.cloud.video.livestream.v1.IUpdatePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updatePool( + request: protos.google.cloud.video.livestream.v1.IUpdatePoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updatePool( + request?: protos.google.cloud.video.livestream.v1.IUpdatePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'pool.name': request.pool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updatePool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updatePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.update_pool.js + * region_tag:livestream_v1_generated_LivestreamService_UpdatePool_async + */ + async checkUpdatePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.livestream.v1.Pool, + protos.google.cloud.video.livestream.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updatePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.livestream.v1.Pool, + protos.google.cloud.video.livestream.v1.OperationMetadata + >; + } + /** + * Returns a list of all channels in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * {@link google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token|next_page_token} + * to determine if there are more items left to be queried. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {string} request.filter + * The filter to apply to list results. + * @param {string} request.orderBy + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.video.livestream.v1.Channel | Channel}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listChannelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listChannels( + request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IChannel[], + protos.google.cloud.video.livestream.v1.IListChannelsRequest | null, + protos.google.cloud.video.livestream.v1.IListChannelsResponse + ] + >; + listChannels( + request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListChannelsRequest, + | protos.google.cloud.video.livestream.v1.IListChannelsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IChannel + > + ): void; + listChannels( + request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + callback: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListChannelsRequest, + | protos.google.cloud.video.livestream.v1.IListChannelsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IChannel + > + ): void; + listChannels( + request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.livestream.v1.IListChannelsRequest, + | protos.google.cloud.video.livestream.v1.IListChannelsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IChannel + >, + callback?: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListChannelsRequest, + | protos.google.cloud.video.livestream.v1.IListChannelsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IChannel + > + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IChannel[], + protos.google.cloud.video.livestream.v1.IListChannelsRequest | null, protos.google.cloud.video.livestream.v1.IListChannelsResponse ] > | void { @@ -2944,6 +3651,213 @@ export class LivestreamServiceClient { callSettings ) as AsyncIterable; } + /** + * Returns a list of all assets in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link google.cloud.video.livestream.v1.Asset | Asset}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssets( + request?: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IAsset[], + protos.google.cloud.video.livestream.v1.IListAssetsRequest | null, + protos.google.cloud.video.livestream.v1.IListAssetsResponse + ] + >; + listAssets( + request: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListAssetsRequest, + | protos.google.cloud.video.livestream.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IAsset + > + ): void; + listAssets( + request: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListAssetsRequest, + | protos.google.cloud.video.livestream.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IAsset + > + ): void; + listAssets( + request?: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.livestream.v1.IListAssetsRequest, + | protos.google.cloud.video.livestream.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IAsset + >, + callback?: PaginationCallback< + protos.google.cloud.video.livestream.v1.IListAssetsRequest, + | protos.google.cloud.video.livestream.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.video.livestream.v1.IAsset + > + ): Promise< + [ + protos.google.cloud.video.livestream.v1.IAsset[], + protos.google.cloud.video.livestream.v1.IListAssetsRequest | null, + protos.google.cloud.video.livestream.v1.IListAssetsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAssets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link google.cloud.video.livestream.v1.Asset | Asset} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetsStream( + request?: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAssets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.video.livestream.v1.Asset | Asset}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/livestream_service.list_assets.js + * region_tag:livestream_v1_generated_LivestreamService_ListAssets_async + */ + listAssetsAsync( + request?: protos.google.cloud.video.livestream.v1.IListAssetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } /** * Gets information about a location. * @@ -3203,6 +4117,55 @@ export class LivestreamServiceClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project: string, location: string, asset: string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + /** * Return a fully-qualified channel resource name string. * @@ -3399,6 +4362,55 @@ export class LivestreamServiceClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified pool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pool + * @returns {string} Resource name string. + */ + poolPath(project: string, location: string, pool: string) { + return this.pathTemplates.poolPathTemplate.render({ + project: project, + location: location, + pool: pool, + }); + } + + /** + * Parse the project from Pool resource. + * + * @param {string} poolName + * A fully-qualified path representing Pool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPoolName(poolName: string) { + return this.pathTemplates.poolPathTemplate.match(poolName).project; + } + + /** + * Parse the location from Pool resource. + * + * @param {string} poolName + * A fully-qualified path representing Pool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPoolName(poolName: string) { + return this.pathTemplates.poolPathTemplate.match(poolName).location; + } + + /** + * Parse the pool from Pool resource. + * + * @param {string} poolName + * A fully-qualified path representing Pool resource. + * @returns {string} A string representing the pool. + */ + matchPoolFromPoolName(poolName: string) { + return this.pathTemplates.poolPathTemplate.match(poolName).pool; + } + /** * Return a fully-qualified project resource name string. * diff --git a/packages/google-cloud-video-livestream/src/v1/livestream_service_client_config.json b/packages/google-cloud-video-livestream/src/v1/livestream_service_client_config.json index 54b1640f293..51e0b2e7ea2 100644 --- a/packages/google-cloud-video-livestream/src/v1/livestream_service_client_config.json +++ b/packages/google-cloud-video-livestream/src/v1/livestream_service_client_config.json @@ -111,6 +111,30 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateAsset": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAsset": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAsset": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAssets": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdatePool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts b/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts index 5681c7843c1..2792aae7adc 100644 --- a/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts +++ b/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts @@ -908,6 +908,260 @@ describe('v1.LivestreamServiceClient', () => { }); }); + describe('getAsset', () => { + it('invokes getAsset without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Asset() + ); + client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); + const [response] = await client.getAsset(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Asset() + ); + client.innerApiCalls.getAsset = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAsset( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.livestream.v1.IAsset | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAsset(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset with closed client', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAsset(request), expectedError); + }); + }); + + describe('getPool', () => { + it('invokes getPool without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetPoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetPoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Pool() + ); + client.innerApiCalls.getPool = stubSimpleCall(expectedResponse); + const [response] = await client.getPool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPool as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPool without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetPoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetPoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Pool() + ); + client.innerApiCalls.getPool = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPool( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.livestream.v1.IPool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPool as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPool with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetPoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetPoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPool(request), expectedError); + const actualRequest = (client.innerApiCalls.getPool as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPool with closed client', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.GetPoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.GetPoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPool(request), expectedError); + }); + }); + describe('createChannel', () => { it('invokes createChannel without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ @@ -2448,80 +2702,68 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('listChannels', () => { - it('invokes listChannels without error', async () => { + describe('createAsset', () => { + it('invokes createAsset without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.CreateAssetRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - ]; - client.innerApiCalls.listChannels = stubSimpleCall(expectedResponse); - const [response] = await client.listChannels(request); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAsset(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannels without error using callback', async () => { + it('invokes createAsset without error using callback', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.CreateAssetRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() - ), - ]; - client.innerApiCalls.listChannels = - stubSimpleCallWithCallback(expectedResponse); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listChannels( + client.createAsset( request, ( err?: Error | null, - result?: protos.google.cloud.video.livestream.v1.IChannel[] | null + result?: LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -2531,83 +2773,997 @@ describe('v1.LivestreamServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.video.livestream.v1.IAsset, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannels with error', async () => { + it('invokes createAsset with call error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.CreateAssetRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listChannels = stubSimpleCall( + client.innerApiCalls.createAsset = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listChannels(request), expectedError); + await assert.rejects(client.createAsset(request), expectedError); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.createAsset as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannelsStream without error', async () => { + it('invokes createAsset with LRO error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.CreateAssetRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAsset(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAssetProgress without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAssetProgress with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAsset', () => { + it('invokes deleteAsset without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset with call error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAsset(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset with LRO error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteAsset(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAssetProgress without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAssetProgress with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updatePool', () => { + it('invokes updatePool without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() + ); + request.pool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.UpdatePoolRequest', + ['pool', 'name'] + ); + request.pool.name = defaultValue1; + const expectedHeaderRequestParams = `pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updatePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.updatePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePool without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() + ); + request.pool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.UpdatePoolRequest', + ['pool', 'name'] + ); + request.pool.name = defaultValue1; + const expectedHeaderRequestParams = `pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updatePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.video.livestream.v1.IPool, + protos.google.cloud.video.livestream.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePool with call error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() + ); + request.pool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.UpdatePoolRequest', + ['pool', 'name'] + ); + request.pool.name = defaultValue1; + const expectedHeaderRequestParams = `pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updatePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePool with LRO error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() + ); + request.pool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.UpdatePoolRequest', + ['pool', 'name'] + ); + request.pool.name = defaultValue1; + const expectedHeaderRequestParams = `pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updatePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdatePoolProgress without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdatePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdatePoolProgress with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdatePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listChannels', () => { + it('invokes listChannels without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + ]; + client.innerApiCalls.listChannels = stubSimpleCall(expectedResponse); + const [response] = await client.listChannels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannels without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + ]; + client.innerApiCalls.listChannels = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listChannels( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.livestream.v1.IChannel[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannels with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listChannels = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listChannels(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannelsStream without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + ]; + client.descriptors.page.listChannels.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.livestream.v1.Channel[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.livestream.v1.Channel) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listChannels, request) + ); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listChannelsStream with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannels.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.livestream.v1.Channel[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.livestream.v1.Channel) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listChannels, request) + ); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listChannels without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Channel() + ), + ]; + client.descriptors.page.listChannels.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.livestream.v1.IChannel[] = []; + const iterable = client.listChannelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannels.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listChannels.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listChannels with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannels.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listChannelsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.livestream.v1.IChannel[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannels.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listChannels.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listInputs', () => { + it('invokes listInputs without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListInputsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListInputsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + ]; + client.innerApiCalls.listInputs = stubSimpleCall(expectedResponse); + const [response] = await client.listInputs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInputs without error using callback', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListInputsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListInputsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), ]; - client.descriptors.page.listChannels.createStream = + client.innerApiCalls.listInputs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInputs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.livestream.v1.IInput[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInputs with error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListInputsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListInputsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInputs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listInputs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInputs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInputsStream without error', async () => { + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.livestream.v1.ListInputsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.livestream.v1.ListInputsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + generateSampleMessage( + new protos.google.cloud.video.livestream.v1.Input() + ), + ]; + client.descriptors.page.listInputs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listChannelsStream(request); + const stream = client.listInputsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Channel[] = []; + const responses: protos.google.cloud.video.livestream.v1.Input[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Channel) => { + (response: protos.google.cloud.video.livestream.v1.Input) => { responses.push(response); } ); @@ -2621,12 +3777,12 @@ describe('v1.LivestreamServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listInputs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannels, request) + .calledWith(client.innerApiCalls.listInputs, request) ); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listInputs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2634,32 +3790,32 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('invokes listChannelsStream with error', async () => { + it('invokes listInputsStream with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.ListInputsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannels.createStream = stubPageStreamingCall( + client.descriptors.page.listInputs.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listChannelsStream(request); + const stream = client.listInputsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Channel[] = []; + const responses: protos.google.cloud.video.livestream.v1.Input[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Channel) => { + (response: protos.google.cloud.video.livestream.v1.Input) => { responses.push(response); } ); @@ -2672,12 +3828,12 @@ describe('v1.LivestreamServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listInputs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannels, request) + .calledWith(client.innerApiCalls.listInputs, request) ); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listInputs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2685,48 +3841,48 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listChannels without error', async () => { + it('uses async iteration with listInputs without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.ListInputsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Channel() + new protos.google.cloud.video.livestream.v1.Input() ), ]; - client.descriptors.page.listChannels.asyncIterate = + client.descriptors.page.listInputs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.livestream.v1.IChannel[] = []; - const iterable = client.listChannelsAsync(request); + const responses: protos.google.cloud.video.livestream.v1.IInput[] = []; + const iterable = client.listInputsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listChannels.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listInputs.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listChannels.asyncIterate as SinonStub) + (client.descriptors.page.listInputs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2734,40 +3890,41 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listChannels with error', async () => { + it('uses async iteration with listInputs with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListChannelsRequest() + new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListChannelsRequest', + '.google.cloud.video.livestream.v1.ListInputsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannels.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listChannelsAsync(request); + client.descriptors.page.listInputs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listInputsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.livestream.v1.IChannel[] = - []; + const responses: protos.google.cloud.video.livestream.v1.IInput[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listChannels.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listInputs.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listChannels.asyncIterate as SinonStub) + (client.descriptors.page.listInputs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2776,80 +3933,80 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('listInputs', () => { - it('invokes listInputs without error', async () => { + describe('listEvents', () => { + it('invokes listEvents without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), ]; - client.innerApiCalls.listInputs = stubSimpleCall(expectedResponse); - const [response] = await client.listInputs(request); + client.innerApiCalls.listEvents = stubSimpleCall(expectedResponse); + const [response] = await client.listEvents(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listInputs without error using callback', async () => { + it('invokes listEvents without error using callback', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), ]; - client.innerApiCalls.listInputs = + client.innerApiCalls.listEvents = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listInputs( + client.listEvents( request, ( err?: Error | null, - result?: protos.google.cloud.video.livestream.v1.IInput[] | null + result?: protos.google.cloud.video.livestream.v1.IEvent[] | null ) => { if (err) { reject(err); @@ -2862,80 +4019,80 @@ describe('v1.LivestreamServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listInputs with error', async () => { + it('invokes listEvents with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listInputs = stubSimpleCall( + client.innerApiCalls.listEvents = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listInputs(request), expectedError); + await assert.rejects(client.listEvents(request), expectedError); const actualRequest = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listInputs as SinonStub + client.innerApiCalls.listEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listInputsStream without error', async () => { + it('invokes listEventsStream without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), ]; - client.descriptors.page.listInputs.createStream = + client.descriptors.page.listEvents.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listInputsStream(request); + const stream = client.listEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Input[] = []; + const responses: protos.google.cloud.video.livestream.v1.Event[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Input) => { + (response: protos.google.cloud.video.livestream.v1.Event) => { responses.push(response); } ); @@ -2949,12 +4106,12 @@ describe('v1.LivestreamServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listInputs.createStream as SinonStub) + (client.descriptors.page.listEvents.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listInputs, request) + .calledWith(client.innerApiCalls.listEvents, request) ); assert( - (client.descriptors.page.listInputs.createStream as SinonStub) + (client.descriptors.page.listEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2962,32 +4119,32 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('invokes listInputsStream with error', async () => { + it('invokes listEventsStream with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listInputs.createStream = stubPageStreamingCall( + client.descriptors.page.listEvents.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listInputsStream(request); + const stream = client.listEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Input[] = []; + const responses: protos.google.cloud.video.livestream.v1.Event[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Input) => { + (response: protos.google.cloud.video.livestream.v1.Event) => { responses.push(response); } ); @@ -3000,12 +4157,12 @@ describe('v1.LivestreamServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listInputs.createStream as SinonStub) + (client.descriptors.page.listEvents.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listInputs, request) + .calledWith(client.innerApiCalls.listEvents, request) ); assert( - (client.descriptors.page.listInputs.createStream as SinonStub) + (client.descriptors.page.listEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3013,48 +4170,48 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listInputs without error', async () => { + it('uses async iteration with listEvents without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Input() + new protos.google.cloud.video.livestream.v1.Event() ), ]; - client.descriptors.page.listInputs.asyncIterate = + client.descriptors.page.listEvents.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.livestream.v1.IInput[] = []; - const iterable = client.listInputsAsync(request); + const responses: protos.google.cloud.video.livestream.v1.IEvent[] = []; + const iterable = client.listEventsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listInputs.asyncIterate as SinonStub).getCall( + (client.descriptors.page.listEvents.asyncIterate as SinonStub).getCall( 0 ).args[1], request ); assert( - (client.descriptors.page.listInputs.asyncIterate as SinonStub) + (client.descriptors.page.listEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3062,41 +4219,41 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listInputs with error', async () => { + it('uses async iteration with listEvents with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListInputsRequest() + new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListInputsRequest', + '.google.cloud.video.livestream.v1.ListEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listInputs.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listEvents.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listInputsAsync(request); + const iterable = client.listEventsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.livestream.v1.IInput[] = []; + const responses: protos.google.cloud.video.livestream.v1.IEvent[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listInputs.asyncIterate as SinonStub).getCall( + (client.descriptors.page.listEvents.asyncIterate as SinonStub).getCall( 0 ).args[1], request ); assert( - (client.descriptors.page.listInputs.asyncIterate as SinonStub) + (client.descriptors.page.listEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3105,80 +4262,80 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('listEvents', () => { - it('invokes listEvents without error', async () => { + describe('listAssets', () => { + it('invokes listAssets without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), ]; - client.innerApiCalls.listEvents = stubSimpleCall(expectedResponse); - const [response] = await client.listEvents(request); + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEvents without error using callback', async () => { + it('invokes listAssets without error using callback', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), ]; - client.innerApiCalls.listEvents = + client.innerApiCalls.listAssets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listEvents( + client.listAssets( request, ( err?: Error | null, - result?: protos.google.cloud.video.livestream.v1.IEvent[] | null + result?: protos.google.cloud.video.livestream.v1.IAsset[] | null ) => { if (err) { reject(err); @@ -3191,80 +4348,80 @@ describe('v1.LivestreamServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEvents with error', async () => { + it('invokes listAssets with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listEvents = stubSimpleCall( + client.innerApiCalls.listAssets = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listEvents(request), expectedError); + await assert.rejects(client.listAssets(request), expectedError); const actualRequest = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEvents as SinonStub + client.innerApiCalls.listAssets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEventsStream without error', async () => { + it('invokes listAssetsStream without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), ]; - client.descriptors.page.listEvents.createStream = + client.descriptors.page.listAssets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEventsStream(request); + const stream = client.listAssetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Event[] = []; + const responses: protos.google.cloud.video.livestream.v1.Asset[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Event) => { + (response: protos.google.cloud.video.livestream.v1.Asset) => { responses.push(response); } ); @@ -3278,12 +4435,12 @@ describe('v1.LivestreamServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listEvents.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listEvents, request) + .calledWith(client.innerApiCalls.listAssets, request) ); assert( - (client.descriptors.page.listEvents.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3291,32 +4448,32 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('invokes listEventsStream with error', async () => { + it('invokes listAssetsStream with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listEvents.createStream = stubPageStreamingCall( + client.descriptors.page.listAssets.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listEventsStream(request); + const stream = client.listAssetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.livestream.v1.Event[] = []; + const responses: protos.google.cloud.video.livestream.v1.Asset[] = []; stream.on( 'data', - (response: protos.google.cloud.video.livestream.v1.Event) => { + (response: protos.google.cloud.video.livestream.v1.Asset) => { responses.push(response); } ); @@ -3329,12 +4486,12 @@ describe('v1.LivestreamServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listEvents.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listEvents, request) + .calledWith(client.innerApiCalls.listAssets, request) ); assert( - (client.descriptors.page.listEvents.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3342,48 +4499,48 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listEvents without error', async () => { + it('uses async iteration with listAssets without error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), generateSampleMessage( - new protos.google.cloud.video.livestream.v1.Event() + new protos.google.cloud.video.livestream.v1.Asset() ), ]; - client.descriptors.page.listEvents.asyncIterate = + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.livestream.v1.IEvent[] = []; - const iterable = client.listEventsAsync(request); + const responses: protos.google.cloud.video.livestream.v1.IAsset[] = []; + const iterable = client.listAssetsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listEvents.asyncIterate as SinonStub).getCall( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( 0 ).args[1], request ); assert( - (client.descriptors.page.listEvents.asyncIterate as SinonStub) + (client.descriptors.page.listAssets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3391,41 +4548,41 @@ describe('v1.LivestreamServiceClient', () => { ); }); - it('uses async iteration with listEvents with error', async () => { + it('uses async iteration with listAssets with error', async () => { const client = new livestreamserviceModule.v1.LivestreamServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.livestream.v1.ListEventsRequest() + new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.livestream.v1.ListEventsRequest', + '.google.cloud.video.livestream.v1.ListAssetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listEvents.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listEventsAsync(request); + const iterable = client.listAssetsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.livestream.v1.IEvent[] = []; + const responses: protos.google.cloud.video.livestream.v1.IAsset[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listEvents.asyncIterate as SinonStub).getCall( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( 0 ).args[1], request ); assert( - (client.descriptors.page.listEvents.asyncIterate as SinonStub) + (client.descriptors.page.listAssets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3938,6 +5095,70 @@ describe('v1.LivestreamServiceClient', () => { }); describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + asset: 'assetValue', + }; + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('channel', () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { @@ -4191,6 +5412,70 @@ describe('v1.LivestreamServiceClient', () => { }); }); + describe('pool', () => { + const fakePath = '/rendered/path/pool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pool: 'poolValue', + }; + const client = new livestreamserviceModule.v1.LivestreamServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.poolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.poolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('poolPath', () => { + const result = client.poolPath( + 'projectValue', + 'locationValue', + 'poolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.poolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPoolName', () => { + const result = client.matchProjectFromPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.poolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPoolName', () => { + const result = client.matchLocationFromPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.poolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPoolFromPoolName', () => { + const result = client.matchPoolFromPoolName(fakePath); + assert.strictEqual(result, 'poolValue'); + assert( + (client.pathTemplates.poolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = {