diff --git a/packages/google-cloud-video-stitcher/README.md b/packages/google-cloud-video-stitcher/README.md index 9dab194ba27..e1b703b8b2a 100644 --- a/packages/google-cloud-video-stitcher/README.md +++ b/packages/google-cloud-video-stitcher/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Video Stitcher API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Video Stitcher API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher) [![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/video-stitcher.svg)](https://www.npmjs.org/package/@google-cloud/video-stitcher) @@ -58,32 +58,35 @@ npm install @google-cloud/video-stitcher ## 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-stitcher/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Video_stitcher_service.create_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js,samples/README.md) | -| Video_stitcher_service.create_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.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-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js,samples/README.md) | -| Video_stitcher_service.create_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.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-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js,samples/README.md) | -| Video_stitcher_service.create_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.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-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js,samples/README.md) | -| Video_stitcher_service.delete_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js,samples/README.md) | -| Video_stitcher_service.delete_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.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-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js,samples/README.md) | -| Video_stitcher_service.get_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js,samples/README.md) | -| Video_stitcher_service.get_live_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js,samples/README.md) | -| Video_stitcher_service.get_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js,samples/README.md) | -| Video_stitcher_service.get_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.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-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js,samples/README.md) | -| Video_stitcher_service.get_vod_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js,samples/README.md) | -| Video_stitcher_service.get_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js,samples/README.md) | -| Video_stitcher_service.get_vod_stitch_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js,samples/README.md) | -| Video_stitcher_service.list_cdn_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.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-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js,samples/README.md) | -| Video_stitcher_service.list_live_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js,samples/README.md) | -| Video_stitcher_service.list_slates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.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-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js,samples/README.md) | -| Video_stitcher_service.list_vod_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js,samples/README.md) | -| Video_stitcher_service.list_vod_stitch_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js,samples/README.md) | -| Video_stitcher_service.update_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js,samples/README.md) | -| Video_stitcher_service.update_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.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-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/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-stitcher/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/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-stitcher/samples/test/quickstart.js,samples/README.md) | +| Video_stitcher_service.create_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.create_live_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.create_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.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-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.create_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.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-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.create_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.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-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.delete_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.delete_live_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.delete_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.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-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_live_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_live_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.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-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_vod_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.get_vod_stitch_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.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-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_cdn_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.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-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_live_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_live_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.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-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_slates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.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-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_vod_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.list_vod_stitch_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.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-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.update_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.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-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Video_stitcher_service.update_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.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-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js,packages/google-cloud-video-stitcher/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/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-stitcher/samples/quickstart.js,packages/google-cloud-video-stitcher/samples/README.md) | diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/common/operation_metadata.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/common/operation_metadata.proto new file mode 100644 index 00000000000..24300e36f8a --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/common/operation_metadata.proto @@ -0,0 +1,53 @@ +// Copyright 2021 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.common; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/common;common"; +option java_multiple_files = true; +option java_package = "com.google.cloud.common"; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][] of 1, + // corresponding to `Code.CANCELLED`. + bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto index 1961fa9b810..9efe99e2de1 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.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-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto index fd7a40200da..1513c3da003 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.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-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto index ef87e1994de..a089ed150ee 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.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-stitcher/protos/google/cloud/video/stitcher/v1/events.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.proto index 24e4c459c80..6a538ebc6cc 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.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-stitcher/protos/google/cloud/video/stitcher/v1/live_configs.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/live_configs.proto new file mode 100644 index 00000000000..1b0192ab33c --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/live_configs.proto @@ -0,0 +1,140 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpb"; +option java_multiple_files = true; +option java_outer_classname = "LiveConfigsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Determines the ad tracking policy. +enum AdTracking { + // The ad tracking policy is not specified. + AD_TRACKING_UNSPECIFIED = 0; + + // Client-side ad tracking is specified. The client player is expected to + // trigger playback and activity events itself. + CLIENT = 1; + + // The Video Stitcher API will trigger playback events on behalf of + // the client player. + SERVER = 2; +} + +// Metadata for used to register live configs. +message LiveConfig { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/LiveConfig" + pattern: "projects/{project}/locations/{location}/liveConfigs/{live_config}" + }; + + // State of the live config. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // Live config is being created. + CREATING = 1; + + // Live config is ready for use. + READY = 2; + + // Live config is queued up for deletion. + DELETING = 3; + } + + // Defines the ad stitching behavior in case the ad duration does not align + // exactly with the ad break boundaries. If not specified, the default is + // `CUT_CURRENT`. + enum StitchingPolicy { + // Stitching policy is not specified. + STITCHING_POLICY_UNSPECIFIED = 0; + + // Cuts an ad short and returns to content in the middle of the ad. + CUT_CURRENT = 1; + + // Finishes stitching the current ad before returning to content. + COMPLETE_AD = 2; + } + + // Output only. The resource name of the live config, in the form of + // `projects/{project}/locations/{location}/liveConfigs/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Source URI for the live stream manifest. + string source_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // The default ad tag associated with this live stream config. + string ad_tag_uri = 3; + + // Additional metadata used to register a live stream with Google Ad Manager + // (GAM) + GamLiveConfig gam_live_config = 4; + + // Output only. State of the live config. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Determines how the ads are tracked. If + // [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] + // is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + AdTracking ad_tracking = 6 [(google.api.field_behavior) = REQUIRED]; + + // This must refer to a slate in the same + // project. If Google Ad Manager (GAM) is used for ads, this string sets the + // value of `slateCreativeId` in + // https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + string default_slate = 7 [(google.api.resource_reference) = { + type: "videostitcher.googleapis.com/Slate" + }]; + + // Defines the stitcher behavior in case an ad does not align exactly with + // the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + StitchingPolicy stitching_policy = 8; + + // The configuration for prefetching ads. + PrefetchConfig prefetch_config = 10; +} + +// The configuration for prefetch ads. +message PrefetchConfig { + // Required. Indicates whether the option to prefetch ad requests is enabled. + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; + + // The duration in seconds of the part of the break to be prefetched. + // This field is only relevant if prefetch is enabled. + // You should set this duration to as long as possible to increase the + // benefits of prefetching, but not longer than the shortest ad break + // expected. For example, for a live event with 30s and 60s ad breaks, the + // initial duration should be set to 30s. + google.protobuf.Duration initial_ad_request_duration = 2; +} + +// Metadata used to register a live stream with Google Ad Manager (GAM) +message GamLiveConfig { + // Required. Ad Manager network code to associate with the live config. + string network_code = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The asset key identifier generated for the live config. + string asset_key = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The custom asset key identifier generated for the live config. + string custom_asset_key = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto index 035e274f202..70c30bdfd78 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.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. @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/video/stitcher/v1/companions.proto"; import "google/cloud/video/stitcher/v1/events.proto"; +import "google/cloud/video/stitcher/v1/live_configs.proto"; import "google/protobuf/duration.proto"; option go_package = "cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpb"; @@ -27,13 +28,23 @@ option java_multiple_files = true; option java_outer_classname = "SessionsProto"; option java_package = "com.google.cloud.video.stitcher.v1"; -// Metadata for a VOD session. +// Metadata for a VOD session. The session expires 4 hours after its creation. message VodSession { option (google.api.resource) = { type: "videostitcher.googleapis.com/VodSession" pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}" }; + // Defines fields related to Google Ad Manager (GAM). This should be set if + // GAM is being used for ads. + message GamSettings { + // Required. Ad Manager network code. + string network_code = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The stream ID generated by Ad Manager. + string stream_id = 2 [(google.api.field_behavior) = REQUIRED]; + } + // Output only. The name of the VOD session, in the form of // `projects/{project_number}/locations/{location}/vodSessions/{id}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -64,19 +75,20 @@ message VodSession { // `"`https://doubleclick.google.com/ad/1?geo_id=123"` map ad_tag_macro_map = 7; - // Indicates whether client side ad tracking is enabled. If client - // side ad tracking is enabled, then the client player is expected - // to trigger playback and activity events itself. - // If this is set to false, server side ad tracking is enabled, - // causing the Video Stitcher service will trigger playback events - // on behalf of the client player. - bool client_ad_tracking = 8; - // Additional options that affect the output of the manifest. ManifestOptions manifest_options = 9; // Output only. The generated ID of the VodSession's source media. string asset_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Determines how the ad should be tracked. If + // [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] + // is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + AdTracking ad_tracking = 11 [(google.api.field_behavior) = REQUIRED]; + + // This field should be set with appropriate values if GAM is being used for + // ads. + GamSettings gam_settings = 13; } // Describes what was stitched into a VOD session's manifest. @@ -126,24 +138,20 @@ message VodSessionAdBreak { google.protobuf.Duration start_time_offset = 4; } -// Metadata for a live session. +// Metadata for a live session. The session expires 5 minutes after the client +// stops fetching the session's playlists. message LiveSession { option (google.api.resource) = { type: "videostitcher.googleapis.com/LiveSession" pattern: "projects/{project}/locations/{location}/liveSessions/{live_session}" }; - // Defines the stitcher behavior in case an ad does not align exactly with - // the ad break boundaries. If not specified, the default is COMPLETE_AD. - enum StitchingPolicy { - // Stitching policy is not specified. - STITCHING_POLICY_UNSPECIFIED = 0; - - // Finishes stitching the current ad before returning to content. - COMPLETE_AD = 1; - - // Cuts an ad short and returns to content in the middle of the ad. - CUT_CURRENT = 3; + // Defines fields related to Google Ad Manager (GAM). This should be set if + // GAM + // is being used for ads. + message GamSettings { + // Required. The stream ID generated by Ad Manager. + string stream_id = 1 [(google.api.field_behavior) = REQUIRED]; } // Output only. The name of the live session, in the form of @@ -153,20 +161,6 @@ message LiveSession { // Output only. The URI to play the live session's ad-stitched stream. string play_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The URI of the live session's source stream. - string source_uri = 3; - - // The default ad tag to use when no ad tag ids are specified in an ad break's - // SCTE-35 message. - // - // default_ad_tag_id is necessary when `adTagMap` has more than one key. Its - // value must be present in the `adTagMap`. - string default_ad_tag_id = 4; - - // Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos - // each with at least one audio track. - map ad_tag_map = 5; - // Key value pairs for ad tag macro replacement. If the // specified ad tag URI has macros, this field provides the mapping // to the value that will replace the macro in the ad tag URI. @@ -182,33 +176,21 @@ message LiveSession { // `"https://doubleclick.google.com/ad/1?geo_id=123"` map ad_tag_macros = 6; - // Whether client side ad tracking is enabled. If enabled, the client player - // is expected to trigger playback and activity events itself. Otherwise, - // server side ad tracking is enabled and the Video Stitcher API will trigger - // playback events on behalf of the client player. - bool client_ad_tracking = 7; - - // The default slate to use when no slates are specified in an ad break's - // SCTE-35 message. When specified, this value must match the ID for a slate - // that has already been created via the - // [CreateSlate](projects.locations.slates/create) method. - string default_slate_id = 8; - - // Defines the stitcher behavior in case an ad does not align exactly with - // the ad break boundaries. If not specified, the default is `COMPLETE_AD`. - StitchingPolicy stitching_policy = 9; - // Additional options that affect the output of the manifest. ManifestOptions manifest_options = 10; - // Output only. The generated ID of the LiveSession's source stream. - string stream_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata of an ad tag. -message AdTag { - // Ad tag URI template. - string uri = 1; + // This field should be set with appropriate values if GAM is being used for + // ads. + GamSettings gam_settings = 15; + + // Required. The resource name of the live config for this session, in the + // form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + string live_config = 16 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveConfig" + } + ]; } // Options for manifest generation. diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto index eaa516713f9..902a444ef26 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.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. @@ -31,6 +31,16 @@ message Slate { pattern: "projects/{project}/locations/{location}/slates/{slate}" }; + // GamSlate object has Google Ad Manager (GAM) related properties for the + // slate. + message GamSlate { + // Required. Ad Manager network code to associate with the live config. + string network_code = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The identifier generated for the slate by GAM. + int64 gam_slate_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Output only. The name of the slate, in the form of // `projects/{project_number}/locations/{location}/slates/{id}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -38,4 +48,7 @@ message Slate { // The URI to fetch the source content for the slate. This URI must return an // MP4 video with at least one audio track. string uri = 2; + + // gam_slate has all the GAM-related attributes of slates. + GamSlate gam_slate = 3; } diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto index 293f9b14b63..e51c72d642e 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.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. @@ -50,11 +50,13 @@ message AdStitchDetail { string ad_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The time offset of the processed ad. - google.protobuf.Duration ad_time_offset = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration ad_time_offset = 3 + [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates the reason why the ad has been skipped. string skip_reason = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The metadata of the chosen media file for the ad. - map media = 5 [(google.api.field_behavior) = OPTIONAL]; + map media = 5 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto index 8e86835a406..3cd6a27f0d8 100644 --- a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_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. @@ -22,11 +22,14 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/video/stitcher/v1/ad_tag_details.proto"; import "google/cloud/video/stitcher/v1/cdn_keys.proto"; +import "google/cloud/video/stitcher/v1/live_configs.proto"; import "google/cloud/video/stitcher/v1/sessions.proto"; import "google/cloud/video/stitcher/v1/slates.proto"; import "google/cloud/video/stitcher/v1/stitch_details.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpb"; option java_multiple_files = true; @@ -40,15 +43,20 @@ option java_package = "com.google.cloud.video.stitcher.v1"; // content with any standard VMAP compliant ad server. service VideoStitcherService { option (google.api.default_host) = "videostitcher.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a new CDN key. - rpc CreateCdnKey(CreateCdnKeyRequest) returns (CdnKey) { + rpc CreateCdnKey(CreateCdnKeyRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/cdnKeys" body: "cdn_key" }; option (google.api.method_signature) = "parent,cdn_key,cdn_key_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.video.stitcher.v1.CdnKey" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Lists all CDN keys in the specified project and location. @@ -68,21 +76,29 @@ service VideoStitcherService { } // Deletes the specified CDN key. - rpc DeleteCdnKey(DeleteCdnKeyRequest) returns (google.protobuf.Empty) { + rpc DeleteCdnKey(DeleteCdnKeyRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/cdnKeys/*}" }; option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Updates the specified CDN key. Only update fields specified // in the call method body. - rpc UpdateCdnKey(UpdateCdnKeyRequest) returns (CdnKey) { + rpc UpdateCdnKey(UpdateCdnKeyRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}" body: "cdn_key" }; option (google.api.method_signature) = "cdn_key,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.video.stitcher.v1.CdnKey" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Creates a client side playback VOD session and returns the full @@ -106,7 +122,8 @@ service VideoStitcherService { // Returns a list of detailed stitching information of the specified VOD // session. - rpc ListVodStitchDetails(ListVodStitchDetailsRequest) returns (ListVodStitchDetailsResponse) { + rpc ListVodStitchDetails(ListVodStitchDetailsRequest) + returns (ListVodStitchDetailsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails" }; @@ -122,7 +139,8 @@ service VideoStitcherService { } // Return the list of ad tag details for the specified VOD session. - rpc ListVodAdTagDetails(ListVodAdTagDetailsRequest) returns (ListVodAdTagDetailsResponse) { + rpc ListVodAdTagDetails(ListVodAdTagDetailsRequest) + returns (ListVodAdTagDetailsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails" }; @@ -138,7 +156,8 @@ service VideoStitcherService { } // Return the list of ad tag details for the specified live session. - rpc ListLiveAdTagDetails(ListLiveAdTagDetailsRequest) returns (ListLiveAdTagDetailsResponse) { + rpc ListLiveAdTagDetails(ListLiveAdTagDetailsRequest) + returns (ListLiveAdTagDetailsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails" }; @@ -154,12 +173,16 @@ service VideoStitcherService { } // Creates a slate. - rpc CreateSlate(CreateSlateRequest) returns (Slate) { + rpc CreateSlate(CreateSlateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/slates" body: "slate" }; option (google.api.method_signature) = "parent,slate,slate_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.video.stitcher.v1.Slate" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Lists all slates in the specified project and location. @@ -179,20 +202,28 @@ service VideoStitcherService { } // Updates the specified slate. - rpc UpdateSlate(UpdateSlateRequest) returns (Slate) { + rpc UpdateSlate(UpdateSlateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{slate.name=projects/*/locations/*/slates/*}" body: "slate" }; option (google.api.method_signature) = "slate,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.video.stitcher.v1.Slate" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Deletes the specified slate. - rpc DeleteSlate(DeleteSlateRequest) returns (google.protobuf.Empty) { + rpc DeleteSlate(DeleteSlateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/slates/*}" }; option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; } // Creates a new live session. @@ -211,12 +242,59 @@ service VideoStitcherService { }; option (google.api.method_signature) = "name"; } + + // Registers the live config with the provided unique ID in + // the specified region. + rpc CreateLiveConfig(CreateLiveConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/liveConfigs" + body: "live_config" + }; + option (google.api.method_signature) = "parent,live_config,live_config_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.video.stitcher.v1.LiveConfig" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; + } + + // Lists all live configs managed by the Video Stitcher that + // belong to the specified project and region. + rpc ListLiveConfigs(ListLiveConfigsRequest) + returns (ListLiveConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/liveConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified live config managed by the Video + // Stitcher service. + rpc GetLiveConfig(GetLiveConfigRequest) returns (LiveConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/liveConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the specified live config. + rpc DeleteLiveConfig(DeleteLiveConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/liveConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.video.stitcher.v1.OperationMetadata" + }; + } } // Request message for VideoStitcherService.createCdnKey. message CreateCdnKeyRequest { - // Required. The project in which the CDN key should be created, in the form of - // `projects/{project_number}/locations/{location}`. + // Required. The project in which the CDN key should be created, in the form + // of `projects/{project_number}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -227,8 +305,8 @@ message CreateCdnKeyRequest { // Required. The CDN key resource to create. CdnKey cdn_key = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the CDN key, which will become the final component of - // the CDN key's resource name. + // Required. The ID to use for the CDN key, which will become the final + // component of the CDN key's resource name. // // This value should conform to RFC-1034, which restricts to // lower-case letters, numbers, and hyphen, with the first character a @@ -305,13 +383,14 @@ message UpdateCdnKeyRequest { // Required. The update mask applies to the resource. // For the `FieldMask` definition, see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for VideoStitcherService.createVodSession message CreateVodSessionRequest { - // Required. The project and location in which the VOD session should be created, in the - // form of `projects/{project_number}/locations/{location}`. + // Required. The project and location in which the VOD session should be + // created, in the form of `projects/{project_number}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -337,8 +416,8 @@ message GetVodSessionRequest { // Request message for VideoStitcherService.listVodStitchDetails. message ListVodStitchDetailsRequest { - // Required. The VOD session where the stitch details belong to, in the form of - // `projects/{project}/locations/{location}/vodSessions/{id}`. + // Required. The VOD session where the stitch details belong to, in the form + // of `projects/{project}/locations/{location}/vodSessions/{id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -364,7 +443,8 @@ message ListVodStitchDetailsResponse { // Request message for VideoStitcherService.getVodStitchDetail. message GetVodStitchDetailRequest { - // Required. The name of the stitch detail in the specified VOD session, in the form of + // Required. The name of the stitch detail in the specified VOD session, in + // the form of // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -376,8 +456,8 @@ message GetVodStitchDetailRequest { // Request message for VideoStitcherService.listVodAdTagDetails. message ListVodAdTagDetailsRequest { - // Required. The VOD session which the ad tag details belong to, in the form of - // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + // Required. The VOD session which the ad tag details belong to, in the form + // of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -403,7 +483,8 @@ message ListVodAdTagDetailsResponse { // Request message for VideoStitcherService.getVodAdTagDetail message GetVodAdTagDetailRequest { - // Required. The name of the ad tag detail for the specified VOD session, in the form of + // Required. The name of the ad tag detail for the specified VOD session, in + // the form of // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -455,7 +536,7 @@ message GetLiveAdTagDetailRequest { // Request message for VideoStitcherService.createSlate. message CreateSlateRequest { // Required. The project in which the slate should be created, in the form of - // `projects/{project_number}`. + // `projects/{project_number}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -471,12 +552,27 @@ message CreateSlateRequest { // Required. The slate to create. Slate slate = 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 VideoStitcherService.getSlate. message GetSlateRequest { - // Required. The name of the slate to be retrieved, of the slate, in the form of - // `projects/{project_number}/locations/{location}/slates/{id}`. + // Required. The name of the slate to be retrieved, of the slate, in the form + // of `projects/{project_number}/locations/{location}/slates/{id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -487,7 +583,8 @@ message GetSlateRequest { // Request message for VideoStitcherService.listSlates. message ListSlatesRequest { - // Required. The project to list slates, in the form of `projects/{project_number}`. + // Required. The project to list slates, in the form of + // `projects/{project_number}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -527,7 +624,8 @@ message UpdateSlateRequest { Slate slate = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The update mask which specifies fields which should be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for VideoStitcherService.deleteSlate. @@ -544,8 +642,8 @@ message DeleteSlateRequest { // Request message for VideoStitcherService.createLiveSession. message CreateLiveSessionRequest { - // Required. The project and location in which the live session should be created, - // in the form of `projects/{project_number}/locations/{location}`. + // Required. The project and location in which the live session should be + // created, in the form of `projects/{project_number}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -568,3 +666,115 @@ message GetLiveSessionRequest { } ]; } + +// Request message for VideoStitcherService.createLiveConfig +message CreateLiveConfigRequest { + // Required. The project in which the live config should be created, in + // the form of `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/LiveConfig" + } + ]; + + // Required. The unique identifier ID to use for the live config. + string live_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The live config resource to create. + LiveConfig live_config = 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 VideoStitcherService.listLiveConfig. +message ListLiveConfigsRequest { + // Required. The project that contains the list of live configs, in the + // form of `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/LiveConfig" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Optional. The filter to apply to list results (see + // [Filtering](https://google.aip.dev/160)). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the ordering of results following + // [Cloud API + // syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for VideoStitcher.ListLiveConfig. +message ListLiveConfigsResponse { + // List of live configs. + repeated LiveConfig live_configs = 1; + + // The pagination token. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for VideoStitcherService.getLiveConfig. +message GetLiveConfigRequest { + // Required. The name of the live config to be retrieved, in the form + // of + // `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveConfig" + } + ]; +} + +// Request message for VideoStitcherService.deleteLiveConfig. +message DeleteLiveConfigRequest { + // Required. The name of the live config to be deleted, in the form of + // `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveConfig" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; +} diff --git a/packages/google-cloud-video-stitcher/protos/protos.d.ts b/packages/google-cloud-video-stitcher/protos/protos.d.ts index 4cd8bfcdf9d..7cad6c54b8f 100644 --- a/packages/google-cloud-video-stitcher/protos/protos.d.ts +++ b/packages/google-cloud-video-stitcher/protos/protos.d.ts @@ -1822,6 +1822,388 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** AdTracking enum. */ + enum AdTracking { + AD_TRACKING_UNSPECIFIED = 0, + CLIENT = 1, + SERVER = 2 + } + + /** Properties of a LiveConfig. */ + interface ILiveConfig { + + /** LiveConfig name */ + name?: (string|null); + + /** LiveConfig sourceUri */ + sourceUri?: (string|null); + + /** LiveConfig adTagUri */ + adTagUri?: (string|null); + + /** LiveConfig gamLiveConfig */ + gamLiveConfig?: (google.cloud.video.stitcher.v1.IGamLiveConfig|null); + + /** LiveConfig state */ + state?: (google.cloud.video.stitcher.v1.LiveConfig.State|keyof typeof google.cloud.video.stitcher.v1.LiveConfig.State|null); + + /** LiveConfig adTracking */ + adTracking?: (google.cloud.video.stitcher.v1.AdTracking|keyof typeof google.cloud.video.stitcher.v1.AdTracking|null); + + /** LiveConfig defaultSlate */ + defaultSlate?: (string|null); + + /** LiveConfig stitchingPolicy */ + stitchingPolicy?: (google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy|null); + + /** LiveConfig prefetchConfig */ + prefetchConfig?: (google.cloud.video.stitcher.v1.IPrefetchConfig|null); + } + + /** Represents a LiveConfig. */ + class LiveConfig implements ILiveConfig { + + /** + * Constructs a new LiveConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ILiveConfig); + + /** LiveConfig name. */ + public name: string; + + /** LiveConfig sourceUri. */ + public sourceUri: string; + + /** LiveConfig adTagUri. */ + public adTagUri: string; + + /** LiveConfig gamLiveConfig. */ + public gamLiveConfig?: (google.cloud.video.stitcher.v1.IGamLiveConfig|null); + + /** LiveConfig state. */ + public state: (google.cloud.video.stitcher.v1.LiveConfig.State|keyof typeof google.cloud.video.stitcher.v1.LiveConfig.State); + + /** LiveConfig adTracking. */ + public adTracking: (google.cloud.video.stitcher.v1.AdTracking|keyof typeof google.cloud.video.stitcher.v1.AdTracking); + + /** LiveConfig defaultSlate. */ + public defaultSlate: string; + + /** LiveConfig stitchingPolicy. */ + public stitchingPolicy: (google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy); + + /** LiveConfig prefetchConfig. */ + public prefetchConfig?: (google.cloud.video.stitcher.v1.IPrefetchConfig|null); + + /** + * Creates a new LiveConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveConfig instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ILiveConfig): google.cloud.video.stitcher.v1.LiveConfig; + + /** + * Encodes the specified LiveConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveConfig.verify|verify} messages. + * @param message LiveConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ILiveConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveConfig.verify|verify} messages. + * @param message LiveConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ILiveConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveConfig + * @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.stitcher.v1.LiveConfig; + + /** + * Decodes a LiveConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveConfig + * @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.stitcher.v1.LiveConfig; + + /** + * Verifies a LiveConfig 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 LiveConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.LiveConfig; + + /** + * Creates a plain object from a LiveConfig message. Also converts values to other types if specified. + * @param message LiveConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.LiveConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LiveConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3 + } + + /** StitchingPolicy enum. */ + enum StitchingPolicy { + STITCHING_POLICY_UNSPECIFIED = 0, + CUT_CURRENT = 1, + COMPLETE_AD = 2 + } + } + + /** Properties of a PrefetchConfig. */ + interface IPrefetchConfig { + + /** PrefetchConfig enabled */ + enabled?: (boolean|null); + + /** PrefetchConfig initialAdRequestDuration */ + initialAdRequestDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a PrefetchConfig. */ + class PrefetchConfig implements IPrefetchConfig { + + /** + * Constructs a new PrefetchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IPrefetchConfig); + + /** PrefetchConfig enabled. */ + public enabled: boolean; + + /** PrefetchConfig initialAdRequestDuration. */ + public initialAdRequestDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new PrefetchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrefetchConfig instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IPrefetchConfig): google.cloud.video.stitcher.v1.PrefetchConfig; + + /** + * Encodes the specified PrefetchConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.PrefetchConfig.verify|verify} messages. + * @param message PrefetchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IPrefetchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrefetchConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.PrefetchConfig.verify|verify} messages. + * @param message PrefetchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IPrefetchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrefetchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrefetchConfig + * @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.stitcher.v1.PrefetchConfig; + + /** + * Decodes a PrefetchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrefetchConfig + * @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.stitcher.v1.PrefetchConfig; + + /** + * Verifies a PrefetchConfig 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 PrefetchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrefetchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.PrefetchConfig; + + /** + * Creates a plain object from a PrefetchConfig message. Also converts values to other types if specified. + * @param message PrefetchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.PrefetchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrefetchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrefetchConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GamLiveConfig. */ + interface IGamLiveConfig { + + /** GamLiveConfig networkCode */ + networkCode?: (string|null); + + /** GamLiveConfig assetKey */ + assetKey?: (string|null); + + /** GamLiveConfig customAssetKey */ + customAssetKey?: (string|null); + } + + /** Represents a GamLiveConfig. */ + class GamLiveConfig implements IGamLiveConfig { + + /** + * Constructs a new GamLiveConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGamLiveConfig); + + /** GamLiveConfig networkCode. */ + public networkCode: string; + + /** GamLiveConfig assetKey. */ + public assetKey: string; + + /** GamLiveConfig customAssetKey. */ + public customAssetKey: string; + + /** + * Creates a new GamLiveConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GamLiveConfig instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGamLiveConfig): google.cloud.video.stitcher.v1.GamLiveConfig; + + /** + * Encodes the specified GamLiveConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.GamLiveConfig.verify|verify} messages. + * @param message GamLiveConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGamLiveConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GamLiveConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GamLiveConfig.verify|verify} messages. + * @param message GamLiveConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGamLiveConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GamLiveConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GamLiveConfig + * @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.stitcher.v1.GamLiveConfig; + + /** + * Decodes a GamLiveConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GamLiveConfig + * @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.stitcher.v1.GamLiveConfig; + + /** + * Verifies a GamLiveConfig 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 GamLiveConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GamLiveConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GamLiveConfig; + + /** + * Creates a plain object from a GamLiveConfig message. Also converts values to other types if specified. + * @param message GamLiveConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GamLiveConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GamLiveConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GamLiveConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a VodSession. */ interface IVodSession { @@ -1843,14 +2225,17 @@ export namespace google { /** VodSession adTagMacroMap */ adTagMacroMap?: ({ [k: string]: string }|null); - /** VodSession clientAdTracking */ - clientAdTracking?: (boolean|null); - /** VodSession manifestOptions */ manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); /** VodSession assetId */ assetId?: (string|null); + + /** VodSession adTracking */ + adTracking?: (google.cloud.video.stitcher.v1.AdTracking|keyof typeof google.cloud.video.stitcher.v1.AdTracking|null); + + /** VodSession gamSettings */ + gamSettings?: (google.cloud.video.stitcher.v1.VodSession.IGamSettings|null); } /** Represents a VodSession. */ @@ -1880,15 +2265,18 @@ export namespace google { /** VodSession adTagMacroMap. */ public adTagMacroMap: { [k: string]: string }; - /** VodSession clientAdTracking. */ - public clientAdTracking: boolean; - /** VodSession manifestOptions. */ public manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); /** VodSession assetId. */ public assetId: string; + /** VodSession adTracking. */ + public adTracking: (google.cloud.video.stitcher.v1.AdTracking|keyof typeof google.cloud.video.stitcher.v1.AdTracking); + + /** VodSession gamSettings. */ + public gamSettings?: (google.cloud.video.stitcher.v1.VodSession.IGamSettings|null); + /** * Creates a new VodSession instance using the specified properties. * @param [properties] Properties to set @@ -1967,6 +2355,112 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace VodSession { + + /** Properties of a GamSettings. */ + interface IGamSettings { + + /** GamSettings networkCode */ + networkCode?: (string|null); + + /** GamSettings streamId */ + streamId?: (string|null); + } + + /** Represents a GamSettings. */ + class GamSettings implements IGamSettings { + + /** + * Constructs a new GamSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.VodSession.IGamSettings); + + /** GamSettings networkCode. */ + public networkCode: string; + + /** GamSettings streamId. */ + public streamId: string; + + /** + * Creates a new GamSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GamSettings instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.VodSession.IGamSettings): google.cloud.video.stitcher.v1.VodSession.GamSettings; + + /** + * Encodes the specified GamSettings message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.GamSettings.verify|verify} messages. + * @param message GamSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.VodSession.IGamSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GamSettings message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.GamSettings.verify|verify} messages. + * @param message GamSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.VodSession.IGamSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GamSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GamSettings + * @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.stitcher.v1.VodSession.GamSettings; + + /** + * Decodes a GamSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GamSettings + * @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.stitcher.v1.VodSession.GamSettings; + + /** + * Verifies a GamSettings 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 GamSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GamSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodSession.GamSettings; + + /** + * Creates a plain object from a GamSettings message. Also converts values to other types if specified. + * @param message GamSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodSession.GamSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GamSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GamSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of an Interstitials. */ interface IInterstitials { @@ -2400,32 +2894,17 @@ export namespace google { /** LiveSession playUri */ playUri?: (string|null); - /** LiveSession sourceUri */ - sourceUri?: (string|null); - - /** LiveSession defaultAdTagId */ - defaultAdTagId?: (string|null); - - /** LiveSession adTagMap */ - adTagMap?: ({ [k: string]: google.cloud.video.stitcher.v1.IAdTag }|null); - /** LiveSession adTagMacros */ adTagMacros?: ({ [k: string]: string }|null); - /** LiveSession clientAdTracking */ - clientAdTracking?: (boolean|null); - - /** LiveSession defaultSlateId */ - defaultSlateId?: (string|null); - - /** LiveSession stitchingPolicy */ - stitchingPolicy?: (google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|null); - /** LiveSession manifestOptions */ manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); - /** LiveSession streamId */ - streamId?: (string|null); + /** LiveSession gamSettings */ + gamSettings?: (google.cloud.video.stitcher.v1.LiveSession.IGamSettings|null); + + /** LiveSession liveConfig */ + liveConfig?: (string|null); } /** Represents a LiveSession. */ @@ -2443,32 +2922,17 @@ export namespace google { /** LiveSession playUri. */ public playUri: string; - /** LiveSession sourceUri. */ - public sourceUri: string; - - /** LiveSession defaultAdTagId. */ - public defaultAdTagId: string; - - /** LiveSession adTagMap. */ - public adTagMap: { [k: string]: google.cloud.video.stitcher.v1.IAdTag }; - /** LiveSession adTagMacros. */ public adTagMacros: { [k: string]: string }; - /** LiveSession clientAdTracking. */ - public clientAdTracking: boolean; + /** LiveSession manifestOptions. */ + public manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); - /** LiveSession defaultSlateId. */ - public defaultSlateId: string; + /** LiveSession gamSettings. */ + public gamSettings?: (google.cloud.video.stitcher.v1.LiveSession.IGamSettings|null); - /** LiveSession stitchingPolicy. */ - public stitchingPolicy: (google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy); - - /** LiveSession manifestOptions. */ - public manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); - - /** LiveSession streamId. */ - public streamId: string; + /** LiveSession liveConfig. */ + public liveConfig: string; /** * Creates a new LiveSession instance using the specified properties. @@ -2550,109 +3014,102 @@ export namespace google { namespace LiveSession { - /** StitchingPolicy enum. */ - enum StitchingPolicy { - STITCHING_POLICY_UNSPECIFIED = 0, - COMPLETE_AD = 1, - CUT_CURRENT = 3 - } - } - - /** Properties of an AdTag. */ - interface IAdTag { - - /** AdTag uri */ - uri?: (string|null); - } - - /** Represents an AdTag. */ - class AdTag implements IAdTag { - - /** - * Constructs a new AdTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.stitcher.v1.IAdTag); - - /** AdTag uri. */ - public uri: string; - - /** - * Creates a new AdTag instance using the specified properties. - * @param [properties] Properties to set - * @returns AdTag instance - */ - public static create(properties?: google.cloud.video.stitcher.v1.IAdTag): google.cloud.video.stitcher.v1.AdTag; - - /** - * Encodes the specified AdTag message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. - * @param message AdTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.stitcher.v1.IAdTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdTag message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. - * @param message AdTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.stitcher.v1.IAdTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdTag - * @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.stitcher.v1.AdTag; - - /** - * Decodes an AdTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdTag - * @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.stitcher.v1.AdTag; - - /** - * Verifies an AdTag 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 AdTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdTag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.AdTag; - - /** - * Creates a plain object from an AdTag message. Also converts values to other types if specified. - * @param message AdTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.stitcher.v1.AdTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a GamSettings. */ + interface IGamSettings { - /** - * Converts this AdTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** GamSettings streamId */ + streamId?: (string|null); + } - /** - * Gets the default type url for AdTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a GamSettings. */ + class GamSettings implements IGamSettings { + + /** + * Constructs a new GamSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.LiveSession.IGamSettings); + + /** GamSettings streamId. */ + public streamId: string; + + /** + * Creates a new GamSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GamSettings instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.LiveSession.IGamSettings): google.cloud.video.stitcher.v1.LiveSession.GamSettings; + + /** + * Encodes the specified GamSettings message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.GamSettings.verify|verify} messages. + * @param message GamSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.LiveSession.IGamSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GamSettings message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.GamSettings.verify|verify} messages. + * @param message GamSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.LiveSession.IGamSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GamSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GamSettings + * @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.stitcher.v1.LiveSession.GamSettings; + + /** + * Decodes a GamSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GamSettings + * @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.stitcher.v1.LiveSession.GamSettings; + + /** + * Verifies a GamSettings 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 GamSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GamSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.LiveSession.GamSettings; + + /** + * Creates a plain object from a GamSettings message. Also converts values to other types if specified. + * @param message GamSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.LiveSession.GamSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GamSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GamSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a ManifestOptions. */ @@ -2879,6 +3336,9 @@ export namespace google { /** Slate uri */ uri?: (string|null); + + /** Slate gamSlate */ + gamSlate?: (google.cloud.video.stitcher.v1.Slate.IGamSlate|null); } /** Represents a Slate. */ @@ -2896,6 +3356,9 @@ export namespace google { /** Slate uri. */ public uri: string; + /** Slate gamSlate. */ + public gamSlate?: (google.cloud.video.stitcher.v1.Slate.IGamSlate|null); + /** * Creates a new Slate instance using the specified properties. * @param [properties] Properties to set @@ -2974,6 +3437,112 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Slate { + + /** Properties of a GamSlate. */ + interface IGamSlate { + + /** GamSlate networkCode */ + networkCode?: (string|null); + + /** GamSlate gamSlateId */ + gamSlateId?: (number|Long|string|null); + } + + /** Represents a GamSlate. */ + class GamSlate implements IGamSlate { + + /** + * Constructs a new GamSlate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.Slate.IGamSlate); + + /** GamSlate networkCode. */ + public networkCode: string; + + /** GamSlate gamSlateId. */ + public gamSlateId: (number|Long|string); + + /** + * Creates a new GamSlate instance using the specified properties. + * @param [properties] Properties to set + * @returns GamSlate instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.Slate.IGamSlate): google.cloud.video.stitcher.v1.Slate.GamSlate; + + /** + * Encodes the specified GamSlate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.GamSlate.verify|verify} messages. + * @param message GamSlate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.Slate.IGamSlate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GamSlate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.GamSlate.verify|verify} messages. + * @param message GamSlate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.Slate.IGamSlate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GamSlate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GamSlate + * @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.stitcher.v1.Slate.GamSlate; + + /** + * Decodes a GamSlate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GamSlate + * @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.stitcher.v1.Slate.GamSlate; + + /** + * Verifies a GamSlate 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 GamSlate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GamSlate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.Slate.GamSlate; + + /** + * Creates a plain object from a GamSlate message. Also converts values to other types if specified. + * @param message GamSlate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.Slate.GamSlate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GamSlate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GamSlate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a VodStitchDetail. */ interface IVodStitchDetail { @@ -3221,7 +3790,7 @@ export namespace google { /** * Calls CreateCdnKey. * @param request CreateCdnKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CdnKey + * @param callback Node-style callback called with the error, if any, and Operation */ public createCdnKey(request: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKeyCallback): void; @@ -3230,7 +3799,7 @@ export namespace google { * @param request CreateCdnKeyRequest message or plain object * @returns Promise */ - public createCdnKey(request: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest): Promise; + public createCdnKey(request: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest): Promise; /** * Calls ListCdnKeys. @@ -3263,7 +3832,7 @@ export namespace google { /** * Calls DeleteCdnKey. * @param request DeleteCdnKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * @param callback Node-style callback called with the error, if any, and Operation */ public deleteCdnKey(request: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKeyCallback): void; @@ -3272,12 +3841,12 @@ export namespace google { * @param request DeleteCdnKeyRequest message or plain object * @returns Promise */ - public deleteCdnKey(request: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest): Promise; + public deleteCdnKey(request: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest): Promise; /** * Calls UpdateCdnKey. * @param request UpdateCdnKeyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CdnKey + * @param callback Node-style callback called with the error, if any, and Operation */ public updateCdnKey(request: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKeyCallback): void; @@ -3286,7 +3855,7 @@ export namespace google { * @param request UpdateCdnKeyRequest message or plain object * @returns Promise */ - public updateCdnKey(request: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest): Promise; + public updateCdnKey(request: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest): Promise; /** * Calls CreateVodSession. @@ -3403,7 +3972,7 @@ export namespace google { /** * Calls CreateSlate. * @param request CreateSlateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Slate + * @param callback Node-style callback called with the error, if any, and Operation */ public createSlate(request: google.cloud.video.stitcher.v1.ICreateSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlateCallback): void; @@ -3412,7 +3981,7 @@ export namespace google { * @param request CreateSlateRequest message or plain object * @returns Promise */ - public createSlate(request: google.cloud.video.stitcher.v1.ICreateSlateRequest): Promise; + public createSlate(request: google.cloud.video.stitcher.v1.ICreateSlateRequest): Promise; /** * Calls ListSlates. @@ -3445,7 +4014,7 @@ export namespace google { /** * Calls UpdateSlate. * @param request UpdateSlateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Slate + * @param callback Node-style callback called with the error, if any, and Operation */ public updateSlate(request: google.cloud.video.stitcher.v1.IUpdateSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlateCallback): void; @@ -3454,12 +4023,12 @@ export namespace google { * @param request UpdateSlateRequest message or plain object * @returns Promise */ - public updateSlate(request: google.cloud.video.stitcher.v1.IUpdateSlateRequest): Promise; + public updateSlate(request: google.cloud.video.stitcher.v1.IUpdateSlateRequest): Promise; /** * Calls DeleteSlate. * @param request DeleteSlateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * @param callback Node-style callback called with the error, if any, and Operation */ public deleteSlate(request: google.cloud.video.stitcher.v1.IDeleteSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlateCallback): void; @@ -3468,7 +4037,7 @@ export namespace google { * @param request DeleteSlateRequest message or plain object * @returns Promise */ - public deleteSlate(request: google.cloud.video.stitcher.v1.IDeleteSlateRequest): Promise; + public deleteSlate(request: google.cloud.video.stitcher.v1.IDeleteSlateRequest): Promise; /** * Calls CreateLiveSession. @@ -3497,6 +4066,62 @@ export namespace google { * @returns Promise */ public getLiveSession(request: google.cloud.video.stitcher.v1.IGetLiveSessionRequest): Promise; + + /** + * Calls CreateLiveConfig. + * @param request CreateLiveConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLiveConfig(request: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfigCallback): void; + + /** + * Calls CreateLiveConfig. + * @param request CreateLiveConfigRequest message or plain object + * @returns Promise + */ + public createLiveConfig(request: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest): Promise; + + /** + * Calls ListLiveConfigs. + * @param request ListLiveConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLiveConfigsResponse + */ + public listLiveConfigs(request: google.cloud.video.stitcher.v1.IListLiveConfigsRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigsCallback): void; + + /** + * Calls ListLiveConfigs. + * @param request ListLiveConfigsRequest message or plain object + * @returns Promise + */ + public listLiveConfigs(request: google.cloud.video.stitcher.v1.IListLiveConfigsRequest): Promise; + + /** + * Calls GetLiveConfig. + * @param request GetLiveConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LiveConfig + */ + public getLiveConfig(request: google.cloud.video.stitcher.v1.IGetLiveConfigRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfigCallback): void; + + /** + * Calls GetLiveConfig. + * @param request GetLiveConfigRequest message or plain object + * @returns Promise + */ + public getLiveConfig(request: google.cloud.video.stitcher.v1.IGetLiveConfigRequest): Promise; + + /** + * Calls DeleteLiveConfig. + * @param request DeleteLiveConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLiveConfig(request: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfigCallback): void; + + /** + * Calls DeleteLiveConfig. + * @param request DeleteLiveConfigRequest message or plain object + * @returns Promise + */ + public deleteLiveConfig(request: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest): Promise; } namespace VideoStitcherService { @@ -3504,9 +4129,9 @@ export namespace google { /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createCdnKey}. * @param error Error, if any - * @param [response] CdnKey + * @param [response] Operation */ - type CreateCdnKeyCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.CdnKey) => void; + type CreateCdnKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listCdnKeys}. @@ -3525,16 +4150,16 @@ export namespace google { /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteCdnKey}. * @param error Error, if any - * @param [response] Empty + * @param [response] Operation */ - type DeleteCdnKeyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteCdnKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateCdnKey}. * @param error Error, if any - * @param [response] CdnKey + * @param [response] Operation */ - type UpdateCdnKeyCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.CdnKey) => void; + type UpdateCdnKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createVodSession}. @@ -3595,9 +4220,9 @@ export namespace google { /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createSlate}. * @param error Error, if any - * @param [response] Slate + * @param [response] Operation */ - type CreateSlateCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.Slate) => void; + type CreateSlateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listSlates}. @@ -3616,16 +4241,16 @@ export namespace google { /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateSlate}. * @param error Error, if any - * @param [response] Slate + * @param [response] Operation */ - type UpdateSlateCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.Slate) => void; + type UpdateSlateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteSlate}. * @param error Error, if any - * @param [response] Empty + * @param [response] Operation */ - type DeleteSlateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteSlateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveSession}. @@ -3640,6 +4265,34 @@ export namespace google { * @param [response] LiveSession */ type GetLiveSessionCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.LiveSession) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLiveConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveConfigs}. + * @param error Error, if any + * @param [response] ListLiveConfigsResponse + */ + type ListLiveConfigsCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListLiveConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveConfig}. + * @param error Error, if any + * @param [response] LiveConfig + */ + type GetLiveConfigCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.LiveConfig) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteLiveConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLiveConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CreateCdnKeyRequest. */ @@ -5416,6 +6069,9 @@ export namespace google { /** CreateSlateRequest slate */ slate?: (google.cloud.video.stitcher.v1.ISlate|null); + + /** CreateSlateRequest requestId */ + requestId?: (string|null); } /** Represents a CreateSlateRequest. */ @@ -5436,6 +6092,9 @@ export namespace google { /** CreateSlateRequest slate. */ public slate?: (google.cloud.video.stitcher.v1.ISlate|null); + /** CreateSlateRequest requestId. */ + public requestId: string; + /** * Creates a new CreateSlateRequest instance using the specified properties. * @param [properties] Properties to set @@ -6240,4599 +6899,6547 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - } - } - } - /** Namespace api. */ - namespace api { + /** Properties of a CreateLiveConfigRequest. */ + interface ICreateLiveConfigRequest { - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** CreateLiveConfigRequest parent */ + parent?: (string|null); - /** ResourceDescriptor type */ - type?: (string|null); + /** CreateLiveConfigRequest liveConfigId */ + liveConfigId?: (string|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** CreateLiveConfigRequest liveConfig */ + liveConfig?: (google.cloud.video.stitcher.v1.ILiveConfig|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** CreateLiveConfigRequest requestId */ + requestId?: (string|null); + } - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** Represents a CreateLiveConfigRequest. */ + class CreateLiveConfigRequest implements ICreateLiveConfigRequest { - /** ResourceDescriptor plural */ - plural?: (string|null); + /** + * Constructs a new CreateLiveConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** CreateLiveConfigRequest parent. */ + public parent: string; - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } + /** CreateLiveConfigRequest liveConfigId. */ + public liveConfigId: string; - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** CreateLiveConfigRequest liveConfig. */ + public liveConfig?: (google.cloud.video.stitcher.v1.ILiveConfig|null); - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** CreateLiveConfigRequest requestId. */ + public requestId: string; - /** ResourceDescriptor type. */ - public type: string; + /** + * Creates a new CreateLiveConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLiveConfigRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest): google.cloud.video.stitcher.v1.CreateLiveConfigRequest; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * Encodes the specified CreateLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveConfigRequest.verify|verify} messages. + * @param message CreateLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** + * Encodes the specified CreateLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveConfigRequest.verify|verify} messages. + * @param message CreateLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * Decodes a CreateLiveConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLiveConfigRequest + * @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.stitcher.v1.CreateLiveConfigRequest; - /** ResourceDescriptor plural. */ - public plural: string; + /** + * Decodes a CreateLiveConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLiveConfigRequest + * @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.stitcher.v1.CreateLiveConfigRequest; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Verifies a CreateLiveConfigRequest 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); - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** + * Creates a CreateLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLiveConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CreateLiveConfigRequest; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + /** + * Creates a plain object from a CreateLiveConfigRequest message. Also converts values to other types if specified. + * @param message CreateLiveConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CreateLiveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this CreateLiveConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for CreateLiveConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + /** Properties of a ListLiveConfigsRequest. */ + interface IListLiveConfigsRequest { + + /** ListLiveConfigsRequest parent */ + parent?: (string|null); + + /** ListLiveConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListLiveConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListLiveConfigsRequest filter */ + filter?: (string|null); + + /** ListLiveConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListLiveConfigsRequest. */ + class ListLiveConfigsRequest implements IListLiveConfigsRequest { + + /** + * Constructs a new ListLiveConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListLiveConfigsRequest); + + /** ListLiveConfigsRequest parent. */ + public parent: string; + + /** ListLiveConfigsRequest pageSize. */ + public pageSize: number; + + /** ListLiveConfigsRequest pageToken. */ + public pageToken: string; + + /** ListLiveConfigsRequest filter. */ + public filter: string; + + /** ListLiveConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListLiveConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLiveConfigsRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListLiveConfigsRequest): google.cloud.video.stitcher.v1.ListLiveConfigsRequest; + + /** + * Encodes the specified ListLiveConfigsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsRequest.verify|verify} messages. + * @param message ListLiveConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListLiveConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLiveConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsRequest.verify|verify} messages. + * @param message ListLiveConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListLiveConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLiveConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLiveConfigsRequest + * @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.stitcher.v1.ListLiveConfigsRequest; + + /** + * Decodes a ListLiveConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLiveConfigsRequest + * @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.stitcher.v1.ListLiveConfigsRequest; + + /** + * Verifies a ListLiveConfigsRequest 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 ListLiveConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLiveConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListLiveConfigsRequest; + + /** + * Creates a plain object from a ListLiveConfigsRequest message. Also converts values to other types if specified. + * @param message ListLiveConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListLiveConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLiveConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLiveConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLiveConfigsResponse. */ + interface IListLiveConfigsResponse { + + /** ListLiveConfigsResponse liveConfigs */ + liveConfigs?: (google.cloud.video.stitcher.v1.ILiveConfig[]|null); + + /** ListLiveConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListLiveConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListLiveConfigsResponse. */ + class ListLiveConfigsResponse implements IListLiveConfigsResponse { + + /** + * Constructs a new ListLiveConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListLiveConfigsResponse); + + /** ListLiveConfigsResponse liveConfigs. */ + public liveConfigs: google.cloud.video.stitcher.v1.ILiveConfig[]; + + /** ListLiveConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListLiveConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListLiveConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLiveConfigsResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListLiveConfigsResponse): google.cloud.video.stitcher.v1.ListLiveConfigsResponse; + + /** + * Encodes the specified ListLiveConfigsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsResponse.verify|verify} messages. + * @param message ListLiveConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListLiveConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLiveConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsResponse.verify|verify} messages. + * @param message ListLiveConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListLiveConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLiveConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLiveConfigsResponse + * @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.stitcher.v1.ListLiveConfigsResponse; + + /** + * Decodes a ListLiveConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLiveConfigsResponse + * @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.stitcher.v1.ListLiveConfigsResponse; + + /** + * Verifies a ListLiveConfigsResponse 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 ListLiveConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLiveConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListLiveConfigsResponse; + + /** + * Creates a plain object from a ListLiveConfigsResponse message. Also converts values to other types if specified. + * @param message ListLiveConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListLiveConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLiveConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLiveConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLiveConfigRequest. */ + interface IGetLiveConfigRequest { + + /** GetLiveConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetLiveConfigRequest. */ + class GetLiveConfigRequest implements IGetLiveConfigRequest { + + /** + * Constructs a new GetLiveConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetLiveConfigRequest); + + /** GetLiveConfigRequest name. */ + public name: string; + + /** + * Creates a new GetLiveConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLiveConfigRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetLiveConfigRequest): google.cloud.video.stitcher.v1.GetLiveConfigRequest; + + /** + * Encodes the specified GetLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveConfigRequest.verify|verify} messages. + * @param message GetLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveConfigRequest.verify|verify} messages. + * @param message GetLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLiveConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLiveConfigRequest + * @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.stitcher.v1.GetLiveConfigRequest; + + /** + * Decodes a GetLiveConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLiveConfigRequest + * @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.stitcher.v1.GetLiveConfigRequest; + + /** + * Verifies a GetLiveConfigRequest 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 GetLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLiveConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetLiveConfigRequest; + + /** + * Creates a plain object from a GetLiveConfigRequest message. Also converts values to other types if specified. + * @param message GetLiveConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetLiveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLiveConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLiveConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteLiveConfigRequest. */ + interface IDeleteLiveConfigRequest { + + /** DeleteLiveConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLiveConfigRequest. */ + class DeleteLiveConfigRequest implements IDeleteLiveConfigRequest { + + /** + * Constructs a new DeleteLiveConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest); + + /** DeleteLiveConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteLiveConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLiveConfigRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest): google.cloud.video.stitcher.v1.DeleteLiveConfigRequest; + + /** + * Encodes the specified DeleteLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.verify|verify} messages. + * @param message DeleteLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.verify|verify} messages. + * @param message DeleteLiveConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLiveConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLiveConfigRequest + * @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.stitcher.v1.DeleteLiveConfigRequest; + + /** + * Decodes a DeleteLiveConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLiveConfigRequest + * @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.stitcher.v1.DeleteLiveConfigRequest; + + /** + * Verifies a DeleteLiveConfigRequest 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 DeleteLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLiveConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.DeleteLiveConfigRequest; + + /** + * Creates a plain object from a DeleteLiveConfigRequest message. Also converts values to other types if specified. + * @param message DeleteLiveConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.DeleteLiveConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLiveConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLiveConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IOperationMetadata): google.cloud.video.stitcher.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @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.stitcher.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @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.stitcher.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns ExtensionRangeOptions * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; /** - * Verifies a ResourceDescriptor message. + * Verifies an ExtensionRangeOptions 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for ExtensionRangeOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResourceDescriptor { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** FieldDescriptorProto name */ + name?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** FieldDescriptorProto number */ + number?: (number|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** ResourceReference type */ - type?: (string|null); + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** ResourceReference childType */ - childType?: (string|null); + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Constructs a new ResourceReference. + * Constructs a new FieldDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** ResourceReference type. */ - public type: string; + /** FieldDescriptorProto name. */ + public name: string; - /** ResourceReference childType. */ - public childType: string; + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns FieldDescriptorProto instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns FieldDescriptorProto * @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.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns FieldDescriptorProto * @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.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; /** - * Verifies a ResourceReference message. + * Verifies a FieldDescriptorProto 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for FieldDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } } - /** Properties of a Http. */ - interface IHttp { + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new Http. + * Constructs a new OneofDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** OneofDescriptorProto name. */ + public name: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates a new Http instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns OneofDescriptorProto instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns OneofDescriptorProto * @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.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns OneofDescriptorProto * @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.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; /** - * Verifies a Http message. + * Verifies an OneofDescriptorProto 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 Http message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Http + * Gets the default type url for OneofDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** HttpRule patch */ - patch?: (string|null); + /** EnumDescriptorProto name */ + name?: (string|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** HttpRule body */ - body?: (string|null); + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new HttpRule. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** EnumDescriptorProto name. */ + public name: string; - /** HttpRule body. */ - public body: string; + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** HttpRule responseBody. */ - public responseBody: string; + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns EnumDescriptorProto instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns EnumDescriptorProto * @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.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns EnumDescriptorProto * @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.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; /** - * Verifies a HttpRule message. + * Verifies an EnumDescriptorProto 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpRule + * Gets the default type url for EnumDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + namespace EnumDescriptorProto { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** CustomHttpPattern path */ - path?: (string|null); - } + /** EnumReservedRange start */ + start?: (number|null); - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** EnumReservedRange end */ + end?: (number|null); + } - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** CustomHttpPattern kind. */ - public kind: string; + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** CustomHttpPattern path. */ - public path: string; + /** EnumReservedRange start. */ + public start: number; - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + /** EnumReservedRange end. */ + public end: number; - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Verifies a CustomHttpPattern 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); + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + /** + * Verifies an EnumReservedRange 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 plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - } - /** Namespace protobuf. */ - namespace protobuf { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { /** - * Constructs a new FileDescriptorSet. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns EnumValueDescriptorProto instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto * @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.protobuf.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto * @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.protobuf.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; /** - * Verifies a FileDescriptorSet message. + * Verifies an EnumValueDescriptorProto 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for EnumValueDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** FileDescriptorProto name */ + /** ServiceDescriptorProto name */ name?: (string|null); - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** FileDescriptorProto edition */ - edition?: (string|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** ServiceDescriptorProto name. */ + public name: string; - /** FileDescriptorProto syntax. */ - public syntax: string; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** FileDescriptorProto edition. */ - public edition: string; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns ServiceDescriptorProto instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto * @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.protobuf.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto * @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.protobuf.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; /** - * Verifies a FileDescriptorProto message. + * Verifies a ServiceDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this ServiceDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for ServiceDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** DescriptorProto name */ + /** MethodDescriptorProto name */ name?: (string|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new DescriptorProto. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** DescriptorProto name. */ + /** MethodDescriptorProto name. */ public name: string; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DescriptorProto + * @returns MethodDescriptorProto * @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.protobuf.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @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.protobuf.DescriptorProto; + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** - * Verifies a DescriptorProto 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); + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - namespace DescriptorProto { + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** ExtensionRange start */ - start?: (number|null); + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** ExtensionRange end */ - end?: (number|null); + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** FileOptions javaPackage. */ + public javaPackage: string; - /** ExtensionRange start. */ - public start: number; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** ExtensionRange end. */ - public end: number; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * Verifies an ExtensionRange 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); + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** ReservedRange start */ - start?: (number|null); + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** ReservedRange end */ - end?: (number|null); - } + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** ReservedRange start. */ - public start: number; + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** ReservedRange end. */ - public end: number; + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; + /** + * Verifies a FileOptions 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); - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - /** - * Verifies a ReservedRange 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 plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace FileOptions { - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 } } - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** ExtensionRangeOptions uninterpretedOption */ + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + constructor(properties?: google.protobuf.IMessageOptions); - /** ExtensionRangeOptions uninterpretedOption. */ + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance + * @returns MessageOptions instance */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions + * @returns MessageOptions * @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.protobuf.ExtensionRangeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions + * @returns MessageOptions * @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.protobuf.ExtensionRangeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a MessageOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRangeOptions + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRangeOptions + * Gets the default type url for MessageOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** FieldOptions weak */ + weak?: (boolean|null); - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); - /** FieldDescriptorProto name. */ - public name: string; + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } - /** FieldDescriptorProto number. */ - public number: number; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** FieldOptions packed. */ + public packed: boolean; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** FieldOptions lazy. */ + public lazy: boolean; - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** FieldOptions weak. */ + public weak: boolean; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FieldDescriptorProto instance + * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto + * @returns FieldOptions * @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.protobuf.FieldDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto + * @returns FieldOptions * @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.protobuf.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a FieldDescriptorProto message. + * Verifies a FieldOptions 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for FieldOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldDescriptorProto { + namespace FieldOptions { - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 } - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 } } - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IOneofOptions); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @param [properties] Properties to set - * @returns OneofDescriptorProto instance + * @returns OneofOptions instance */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto + * @returns OneofOptions * @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.protobuf.OneofDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto + * @returns OneofOptions * @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.protobuf.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; /** - * Verifies an OneofDescriptorProto message. + * Verifies an OneofOptions 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for OneofOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + constructor(properties?: google.protobuf.IEnumOptions); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns EnumDescriptorProto instance + * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto + * @returns EnumOptions * @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.protobuf.EnumDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto + * @returns EnumOptions * @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.protobuf.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies an EnumDescriptorProto message. + * Verifies an EnumOptions 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for EnumOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IEnumValueOptions); - /** EnumValueDescriptorProto number. */ - public number: number; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance + * @returns EnumValueOptions instance */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto + * @returns EnumValueOptions * @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.protobuf.EnumValueDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto + * @returns EnumValueOptions * @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.protobuf.EnumValueDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies an EnumValueOptions 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueDescriptorProto + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this EnumValueOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueDescriptorProto + * Gets the default type url for EnumValueOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** ServiceDescriptorProto name */ - name?: (string|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IServiceOptions); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance + * @returns ServiceOptions instance */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto + * @returns ServiceOptions * @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.protobuf.ServiceDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto + * @returns ServiceOptions * @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.protobuf.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a ServiceOptions 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for ServiceOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** MethodDescriptorProto name */ - name?: (string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; + constructor(properties?: google.protobuf.IMethodOptions); - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns MethodDescriptorProto instance + * @returns MethodOptions instance */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto + * @returns MethodOptions * @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.protobuf.MethodDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto + * @returns MethodOptions * @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.protobuf.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies a MethodDescriptorProto message. + * Verifies a MethodOptions 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for MethodOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + namespace MethodOptions { - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); - /** FileOptions deprecated. */ - public deprecated: boolean; + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileOptions + * @returns UninterpretedOption * @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.protobuf.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @returns UninterpretedOption * @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.protobuf.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a FileOptions message. + * Verifies an UninterpretedOption 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileOptions + * Gets the default type url for UninterpretedOption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FileOptions { + namespace UninterpretedOption { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** NamePart namePart. */ + public namePart: string; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** NamePart isExtension. */ + public isExtension: boolean; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * Verifies a NamePart 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); - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageOptions + * @returns SourceCodeInfo * @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.protobuf.MessageOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @returns SourceCodeInfo * @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.protobuf.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a MessageOptions message. + * Verifies a SourceCodeInfo 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for SourceCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + namespace SourceCodeInfo { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** Properties of a Location. */ + interface ILocation { - /** FieldOptions packed */ - packed?: (boolean|null); + /** Location path */ + path?: (number[]|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Location span */ + span?: (number[]|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** Location leadingComments */ + leadingComments?: (string|null); - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); + /** Location trailingComments */ + trailingComments?: (string|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** FieldOptions weak */ - weak?: (boolean|null); + /** Represents a Location. */ + class Location implements ILocation { - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** Location path. */ + public path: number[]; - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - } + /** Location span. */ + public span: number[]; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Location leadingComments. */ + public leadingComments: string; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** Location trailingComments. */ + public trailingComments: string; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** FieldOptions packed. */ - public packed: boolean; + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; - /** FieldOptions weak. */ - public weak: boolean; + /** + * Verifies a Location 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); - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Creates a new FieldOptions instance using the specified properties. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set - * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldOptions + * @returns GeneratedCodeInfo * @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.protobuf.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @returns GeneratedCodeInfo * @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.protobuf.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a FieldOptions message. + * Verifies a GeneratedCodeInfo 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for GeneratedCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldOptions { + namespace GeneratedCodeInfo { - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Properties of a Duration. */ + interface IDuration { - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new OneofOptions. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IDuration); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneofOptions + * @returns Duration * @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.protobuf.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @returns Duration * @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.protobuf.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies an OneofOptions message. + * Verifies a Duration 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for Duration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a Struct. */ + interface IStruct { - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new EnumOptions. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.protobuf.IStruct); - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns EnumOptions instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumOptions + * @returns Struct * @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.protobuf.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @returns Struct * @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.protobuf.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies an EnumOptions message. + * Verifies a Struct 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for Struct * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Properties of a Value. */ + interface IValue { - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new EnumValueOptions. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.protobuf.IValue); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueOptions + * @returns Value * @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.protobuf.EnumValueOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @returns Value * @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.protobuf.EnumValueOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies an EnumValueOptions message. + * Verifies a Value 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Value * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** Properties of a ListValue. */ + interface IListValue { - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new ServiceOptions. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.protobuf.IListValue); - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceOptions instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceOptions + * @returns ListValue * @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.protobuf.ServiceOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @returns ListValue * @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.protobuf.ServiceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a ServiceOptions message. + * Verifies a ListValue 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for ListValue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of an Any. */ + interface IAny { - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** Any type_url */ + type_url?: (string|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new MethodOptions. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.protobuf.IAny); - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** Any type_url. */ + public type_url: string; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodOptions + * @returns Any * @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.protobuf.MethodOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @returns Any * @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.protobuf.MethodOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a MethodOptions message. + * Verifies an Any 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for Any * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new UninterpretedOption. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UninterpretedOption + * @returns Empty * @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.protobuf.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @returns Empty * @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.protobuf.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies an UninterpretedOption message. + * Verifies an Empty 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for Empty * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** FieldMask paths */ + paths?: (string[]|null); + } - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** NamePart namePart. */ - public namePart: string; + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** NamePart isExtension. */ - public isExtension: boolean; + /** FieldMask paths. */ + public paths: string[]; - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @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.protobuf.FieldMask; - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @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.protobuf.FieldMask; - /** - * Verifies a NamePart 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); + /** + * Verifies a FieldMask 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 NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new SourceCodeInfo. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.protobuf.ITimestamp); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceCodeInfo + * @returns Timestamp * @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.protobuf.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @returns Timestamp * @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.protobuf.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a SourceCodeInfo message. + * Verifies a Timestamp 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for Timestamp * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace SourceCodeInfo { + /** Namespace longrunning. */ + namespace longrunning { - /** Properties of a Location. */ - interface ILocation { + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { - /** Location path */ - path?: (number[]|null); + /** + * Constructs a new Operations 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); - /** Location span */ - span?: (number[]|null); + /** + * Creates new Operations 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): Operations; - /** Location leadingComments */ - leadingComments?: (string|null); + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - /** Location trailingComments */ - trailingComments?: (string|null); + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - /** Represents a Location. */ - class Location implements ILocation { + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - /** Location path. */ - public path: number[]; + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - /** Location span. */ - public span: number[]; + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - /** Location leadingComments. */ - public leadingComments: string; + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - /** Location trailingComments. */ - public trailingComments: string; + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + namespace Operations { - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @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.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @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.longrunning.Operation; - /** - * Verifies a Location 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); + /** + * Verifies an Operation 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 Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** GetOperationRequest name */ + name?: (string|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new GetOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.longrunning.IGetOperationRequest); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** GetOperationRequest name. */ + public name: string; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new GetOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns GetOperationRequest instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a GetOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo + * @returns GetOperationRequest * @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.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @returns GetOperationRequest * @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.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a GetOperationRequest 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns GetOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this GetOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for GetOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } + /** ListOperationsRequest name */ + name?: (string|null); - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** ListOperationsRequest filter */ + filter?: (string|null); - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); - /** Annotation path. */ - public path: number[]; + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } - /** Annotation sourceFile. */ - public sourceFile: string; + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { - /** Annotation begin. */ - public begin: number; + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); - /** Annotation end. */ - public end: number; + /** ListOperationsRequest name. */ + public name: string; - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** ListOperationsRequest filter. */ + public filter: string; - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + /** ListOperationsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOperationsRequest pageToken. */ + public pageToken: string; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Annotation 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); + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ListOperationsRequest 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); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace Annotation { + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); - /** Duration nanos */ - nanos?: (number|null); + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { /** - * Constructs a new Duration. + * Constructs a new ListOperationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.longrunning.IListOperationsResponse); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; - /** Duration nanos. */ - public nanos: number; + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Duration instance using the specified properties. + * Creates a new ListOperationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns ListOperationsResponse instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a ListOperationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @returns ListOperationsResponse * @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.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @returns ListOperationsResponse * @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.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; /** - * Verifies a Duration message. + * Verifies a ListOperationsResponse 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 Duration message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns ListOperationsResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this ListOperationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * Gets the default type url for ListOperationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Struct. */ - interface IStruct { + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** CancelOperationRequest name */ + name?: (string|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { /** - * Constructs a new Struct. + * Constructs a new CancelOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.longrunning.ICancelOperationRequest); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** CancelOperationRequest name. */ + public name: string; /** - * Creates a new Struct instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Struct instance + * @returns CancelOperationRequest instance */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Struct + * @returns CancelOperationRequest * @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.protobuf.Struct; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Struct + * @returns CancelOperationRequest * @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.protobuf.Struct; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; /** - * Verifies a Struct message. + * Verifies a CancelOperationRequest 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 Struct message from a plain object. Also converts values to their respective internal types. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Struct + * @returns CancelOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Struct to JSON. + * Converts this CancelOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Struct + * Gets the default type url for CancelOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); + /** DeleteOperationRequest name */ + name?: (string|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { /** - * Constructs a new Value. + * Constructs a new DeleteOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IValue); + constructor(properties?: google.longrunning.IDeleteOperationRequest); - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** DeleteOperationRequest name. */ + public name: string; /** - * Creates a new Value instance using the specified properties. + * Creates a new DeleteOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns DeleteOperationRequest instance */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a DeleteOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns DeleteOperationRequest * @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.protobuf.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns DeleteOperationRequest * @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.protobuf.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; /** - * Verifies a Value message. + * Verifies a DeleteOperationRequest 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 Value message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns DeleteOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this DeleteOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Value + * Gets the default type url for DeleteOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { - /** Properties of a ListValue. */ - interface IListValue { + /** WaitOperationRequest name */ + name?: (string|null); - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { /** - * Constructs a new ListValue. + * Constructs a new WaitOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); + constructor(properties?: google.longrunning.IWaitOperationRequest); - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); /** - * Creates a new ListValue instance using the specified properties. + * Creates a new WaitOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListValue instance + * @returns WaitOperationRequest instance */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a WaitOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListValue + * @returns WaitOperationRequest * @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.protobuf.ListValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListValue + * @returns WaitOperationRequest * @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.protobuf.ListValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; /** - * Verifies a ListValue message. + * Verifies a WaitOperationRequest 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 ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns WaitOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this WaitOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListValue + * Gets the default type url for WaitOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { /** - * Constructs a new Empty. + * Constructs a new OperationInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; /** - * Creates a new Empty instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns OperationInfo instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns OperationInfo * @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.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns OperationInfo * @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.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; /** - * Verifies an Empty message. + * Verifies an OperationInfo 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 Empty message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns OperationInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this OperationInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Empty + * Gets the default type url for OperationInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** Namespace rpc. */ + namespace rpc { - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new FieldMask. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.rpc.IStatus); - /** FieldMask paths. */ - public paths: string[]; + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Status instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Status * @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.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Status * @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.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a FieldMask message. + * Verifies a Status 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldMask + * Gets the default type url for Status * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-video-stitcher/protos/protos.js b/packages/google-cloud-video-stitcher/protos/protos.js index 44453ecd033..98696b8efa8 100644 --- a/packages/google-cloud-video-stitcher/protos/protos.js +++ b/packages/google-cloud-video-stitcher/protos/protos.js @@ -4578,33 +4578,48 @@ return ProgressEvent; })(); - v1.VodSession = (function() { + /** + * AdTracking enum. + * @name google.cloud.video.stitcher.v1.AdTracking + * @enum {number} + * @property {number} AD_TRACKING_UNSPECIFIED=0 AD_TRACKING_UNSPECIFIED value + * @property {number} CLIENT=1 CLIENT value + * @property {number} SERVER=2 SERVER value + */ + v1.AdTracking = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AD_TRACKING_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLIENT"] = 1; + values[valuesById[2] = "SERVER"] = 2; + return values; + })(); + + v1.LiveConfig = (function() { /** - * Properties of a VodSession. + * Properties of a LiveConfig. * @memberof google.cloud.video.stitcher.v1 - * @interface IVodSession - * @property {string|null} [name] VodSession name - * @property {google.cloud.video.stitcher.v1.IInterstitials|null} [interstitials] VodSession interstitials - * @property {string|null} [playUri] VodSession playUri - * @property {string|null} [sourceUri] VodSession sourceUri - * @property {string|null} [adTagUri] VodSession adTagUri - * @property {Object.|null} [adTagMacroMap] VodSession adTagMacroMap - * @property {boolean|null} [clientAdTracking] VodSession clientAdTracking - * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] VodSession manifestOptions - * @property {string|null} [assetId] VodSession assetId + * @interface ILiveConfig + * @property {string|null} [name] LiveConfig name + * @property {string|null} [sourceUri] LiveConfig sourceUri + * @property {string|null} [adTagUri] LiveConfig adTagUri + * @property {google.cloud.video.stitcher.v1.IGamLiveConfig|null} [gamLiveConfig] LiveConfig gamLiveConfig + * @property {google.cloud.video.stitcher.v1.LiveConfig.State|null} [state] LiveConfig state + * @property {google.cloud.video.stitcher.v1.AdTracking|null} [adTracking] LiveConfig adTracking + * @property {string|null} [defaultSlate] LiveConfig defaultSlate + * @property {google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy|null} [stitchingPolicy] LiveConfig stitchingPolicy + * @property {google.cloud.video.stitcher.v1.IPrefetchConfig|null} [prefetchConfig] LiveConfig prefetchConfig */ /** - * Constructs a new VodSession. + * Constructs a new LiveConfig. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VodSession. - * @implements IVodSession + * @classdesc Represents a LiveConfig. + * @implements ILiveConfig * @constructor - * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.ILiveConfig=} [properties] Properties to set */ - function VodSession(properties) { - this.adTagMacroMap = {}; + function LiveConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4612,151 +4627,150 @@ } /** - * VodSession name. + * LiveConfig name. * @member {string} name - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.name = ""; + LiveConfig.prototype.name = ""; /** - * VodSession interstitials. - * @member {google.cloud.video.stitcher.v1.IInterstitials|null|undefined} interstitials - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig sourceUri. + * @member {string} sourceUri + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.interstitials = null; + LiveConfig.prototype.sourceUri = ""; /** - * VodSession playUri. - * @member {string} playUri - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig adTagUri. + * @member {string} adTagUri + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.playUri = ""; + LiveConfig.prototype.adTagUri = ""; /** - * VodSession sourceUri. - * @member {string} sourceUri - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig gamLiveConfig. + * @member {google.cloud.video.stitcher.v1.IGamLiveConfig|null|undefined} gamLiveConfig + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.sourceUri = ""; + LiveConfig.prototype.gamLiveConfig = null; /** - * VodSession adTagUri. - * @member {string} adTagUri - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig state. + * @member {google.cloud.video.stitcher.v1.LiveConfig.State} state + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.adTagUri = ""; + LiveConfig.prototype.state = 0; /** - * VodSession adTagMacroMap. - * @member {Object.} adTagMacroMap - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig adTracking. + * @member {google.cloud.video.stitcher.v1.AdTracking} adTracking + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.adTagMacroMap = $util.emptyObject; + LiveConfig.prototype.adTracking = 0; /** - * VodSession clientAdTracking. - * @member {boolean} clientAdTracking - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig defaultSlate. + * @member {string} defaultSlate + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.clientAdTracking = false; + LiveConfig.prototype.defaultSlate = ""; /** - * VodSession manifestOptions. - * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig stitchingPolicy. + * @member {google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy} stitchingPolicy + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.manifestOptions = null; + LiveConfig.prototype.stitchingPolicy = 0; /** - * VodSession assetId. - * @member {string} assetId - * @memberof google.cloud.video.stitcher.v1.VodSession + * LiveConfig prefetchConfig. + * @member {google.cloud.video.stitcher.v1.IPrefetchConfig|null|undefined} prefetchConfig + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance */ - VodSession.prototype.assetId = ""; + LiveConfig.prototype.prefetchConfig = null; /** - * Creates a new VodSession instance using the specified properties. + * Creates a new LiveConfig instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession instance + * @param {google.cloud.video.stitcher.v1.ILiveConfig=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.LiveConfig} LiveConfig instance */ - VodSession.create = function create(properties) { - return new VodSession(properties); + LiveConfig.create = function create(properties) { + return new LiveConfig(properties); }; /** - * Encodes the specified VodSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * Encodes the specified LiveConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ILiveConfig} message LiveConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSession.encode = function encode(message, writer) { + LiveConfig.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.interstitials != null && Object.hasOwnProperty.call(message, "interstitials")) - $root.google.cloud.video.stitcher.v1.Interstitials.encode(message.interstitials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.playUri != null && Object.hasOwnProperty.call(message, "playUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.playUri); if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceUri); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceUri); if (message.adTagUri != null && Object.hasOwnProperty.call(message, "adTagUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.adTagUri); - if (message.adTagMacroMap != null && Object.hasOwnProperty.call(message, "adTagMacroMap")) - for (var keys = Object.keys(message.adTagMacroMap), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacroMap[keys[i]]).ldelim(); - if (message.clientAdTracking != null && Object.hasOwnProperty.call(message, "clientAdTracking")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.clientAdTracking); - if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) - $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.assetId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.adTagUri); + if (message.gamLiveConfig != null && Object.hasOwnProperty.call(message, "gamLiveConfig")) + $root.google.cloud.video.stitcher.v1.GamLiveConfig.encode(message.gamLiveConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.adTracking != null && Object.hasOwnProperty.call(message, "adTracking")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.adTracking); + if (message.defaultSlate != null && Object.hasOwnProperty.call(message, "defaultSlate")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultSlate); + if (message.stitchingPolicy != null && Object.hasOwnProperty.call(message, "stitchingPolicy")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.stitchingPolicy); + if (message.prefetchConfig != null && Object.hasOwnProperty.call(message, "prefetchConfig")) + $root.google.cloud.video.stitcher.v1.PrefetchConfig.encode(message.prefetchConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified VodSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * Encodes the specified LiveConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ILiveConfig} message LiveConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSession.encodeDelimited = function encodeDelimited(message, writer) { + LiveConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VodSession message from the specified reader or buffer. + * Decodes a LiveConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + * @returns {google.cloud.video.stitcher.v1.LiveConfig} LiveConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSession.decode = function decode(reader, length) { + LiveConfig.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.stitcher.v1.VodSession(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.LiveConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4765,54 +4779,35 @@ break; } case 2: { - message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.decode(reader, reader.uint32()); + message.sourceUri = reader.string(); + break; + } + case 3: { + message.adTagUri = reader.string(); break; } case 4: { - message.playUri = reader.string(); + message.gamLiveConfig = $root.google.cloud.video.stitcher.v1.GamLiveConfig.decode(reader, reader.uint32()); break; } case 5: { - message.sourceUri = reader.string(); + message.state = reader.int32(); break; } case 6: { - message.adTagUri = reader.string(); + message.adTracking = reader.int32(); break; } case 7: { - if (message.adTagMacroMap === $util.emptyObject) - message.adTagMacroMap = {}; - 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.adTagMacroMap[key] = value; + message.defaultSlate = reader.string(); break; } case 8: { - message.clientAdTracking = reader.bool(); - break; - } - case 9: { - message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); + message.stitchingPolicy = reader.int32(); break; } case 10: { - message.assetId = reader.string(); + message.prefetchConfig = $root.google.cloud.video.stitcher.v1.PrefetchConfig.decode(reader, reader.uint32()); break; } default: @@ -4824,214 +4819,309 @@ }; /** - * Decodes a VodSession message from the specified reader or buffer, length delimited. + * Decodes a LiveConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + * @returns {google.cloud.video.stitcher.v1.LiveConfig} LiveConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSession.decodeDelimited = function decodeDelimited(reader) { + LiveConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VodSession message. + * Verifies a LiveConfig message. * @function verify - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VodSession.verify = function verify(message) { + LiveConfig.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.interstitials != null && message.hasOwnProperty("interstitials")) { - var error = $root.google.cloud.video.stitcher.v1.Interstitials.verify(message.interstitials); - if (error) - return "interstitials." + error; - } - if (message.playUri != null && message.hasOwnProperty("playUri")) - if (!$util.isString(message.playUri)) - return "playUri: string expected"; if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) if (!$util.isString(message.sourceUri)) return "sourceUri: string expected"; if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) if (!$util.isString(message.adTagUri)) return "adTagUri: string expected"; - if (message.adTagMacroMap != null && message.hasOwnProperty("adTagMacroMap")) { - if (!$util.isObject(message.adTagMacroMap)) - return "adTagMacroMap: object expected"; - var key = Object.keys(message.adTagMacroMap); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.adTagMacroMap[key[i]])) - return "adTagMacroMap: string{k:string} expected"; + if (message.gamLiveConfig != null && message.hasOwnProperty("gamLiveConfig")) { + var error = $root.google.cloud.video.stitcher.v1.GamLiveConfig.verify(message.gamLiveConfig); + if (error) + return "gamLiveConfig." + error; } - if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) - if (typeof message.clientAdTracking !== "boolean") - return "clientAdTracking: boolean expected"; - if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { - var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.adTracking != null && message.hasOwnProperty("adTracking")) + switch (message.adTracking) { + default: + return "adTracking: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSlate != null && message.hasOwnProperty("defaultSlate")) + if (!$util.isString(message.defaultSlate)) + return "defaultSlate: string expected"; + if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) + switch (message.stitchingPolicy) { + default: + return "stitchingPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.prefetchConfig != null && message.hasOwnProperty("prefetchConfig")) { + var error = $root.google.cloud.video.stitcher.v1.PrefetchConfig.verify(message.prefetchConfig); if (error) - return "manifestOptions." + error; + return "prefetchConfig." + error; } - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; return null; }; /** - * Creates a VodSession message from a plain object. Also converts values to their respective internal types. + * Creates a LiveConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + * @returns {google.cloud.video.stitcher.v1.LiveConfig} LiveConfig */ - VodSession.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.VodSession) + LiveConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.LiveConfig) return object; - var message = new $root.google.cloud.video.stitcher.v1.VodSession(); + var message = new $root.google.cloud.video.stitcher.v1.LiveConfig(); if (object.name != null) message.name = String(object.name); - if (object.interstitials != null) { - if (typeof object.interstitials !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSession.interstitials: object expected"); - message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.fromObject(object.interstitials); - } - if (object.playUri != null) - message.playUri = String(object.playUri); if (object.sourceUri != null) message.sourceUri = String(object.sourceUri); if (object.adTagUri != null) message.adTagUri = String(object.adTagUri); - if (object.adTagMacroMap) { - if (typeof object.adTagMacroMap !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSession.adTagMacroMap: object expected"); - message.adTagMacroMap = {}; - for (var keys = Object.keys(object.adTagMacroMap), i = 0; i < keys.length; ++i) - message.adTagMacroMap[keys[i]] = String(object.adTagMacroMap[keys[i]]); + if (object.gamLiveConfig != null) { + if (typeof object.gamLiveConfig !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveConfig.gamLiveConfig: object expected"); + message.gamLiveConfig = $root.google.cloud.video.stitcher.v1.GamLiveConfig.fromObject(object.gamLiveConfig); } - if (object.clientAdTracking != null) - message.clientAdTracking = Boolean(object.clientAdTracking); - if (object.manifestOptions != null) { - if (typeof object.manifestOptions !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSession.manifestOptions: object expected"); - message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); + 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 "READY": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + } + switch (object.adTracking) { + default: + if (typeof object.adTracking === "number") { + message.adTracking = object.adTracking; + break; + } + break; + case "AD_TRACKING_UNSPECIFIED": + case 0: + message.adTracking = 0; + break; + case "CLIENT": + case 1: + message.adTracking = 1; + break; + case "SERVER": + case 2: + message.adTracking = 2; + break; + } + if (object.defaultSlate != null) + message.defaultSlate = String(object.defaultSlate); + switch (object.stitchingPolicy) { + default: + if (typeof object.stitchingPolicy === "number") { + message.stitchingPolicy = object.stitchingPolicy; + break; + } + break; + case "STITCHING_POLICY_UNSPECIFIED": + case 0: + message.stitchingPolicy = 0; + break; + case "CUT_CURRENT": + case 1: + message.stitchingPolicy = 1; + break; + case "COMPLETE_AD": + case 2: + message.stitchingPolicy = 2; + break; + } + if (object.prefetchConfig != null) { + if (typeof object.prefetchConfig !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveConfig.prefetchConfig: object expected"); + message.prefetchConfig = $root.google.cloud.video.stitcher.v1.PrefetchConfig.fromObject(object.prefetchConfig); } - if (object.assetId != null) - message.assetId = String(object.assetId); return message; }; /** - * Creates a plain object from a VodSession message. Also converts values to other types if specified. + * Creates a plain object from a LiveConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static - * @param {google.cloud.video.stitcher.v1.VodSession} message VodSession + * @param {google.cloud.video.stitcher.v1.LiveConfig} message LiveConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VodSession.toObject = function toObject(message, options) { + LiveConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.adTagMacroMap = {}; if (options.defaults) { object.name = ""; - object.interstitials = null; - object.playUri = ""; object.sourceUri = ""; object.adTagUri = ""; - object.clientAdTracking = false; - object.manifestOptions = null; - object.assetId = ""; + object.gamLiveConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.adTracking = options.enums === String ? "AD_TRACKING_UNSPECIFIED" : 0; + object.defaultSlate = ""; + object.stitchingPolicy = options.enums === String ? "STITCHING_POLICY_UNSPECIFIED" : 0; + object.prefetchConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.interstitials != null && message.hasOwnProperty("interstitials")) - object.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.toObject(message.interstitials, options); - if (message.playUri != null && message.hasOwnProperty("playUri")) - object.playUri = message.playUri; if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) object.sourceUri = message.sourceUri; if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) object.adTagUri = message.adTagUri; - var keys2; - if (message.adTagMacroMap && (keys2 = Object.keys(message.adTagMacroMap)).length) { - object.adTagMacroMap = {}; - for (var j = 0; j < keys2.length; ++j) - object.adTagMacroMap[keys2[j]] = message.adTagMacroMap[keys2[j]]; - } - if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) - object.clientAdTracking = message.clientAdTracking; - if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) - object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; + if (message.gamLiveConfig != null && message.hasOwnProperty("gamLiveConfig")) + object.gamLiveConfig = $root.google.cloud.video.stitcher.v1.GamLiveConfig.toObject(message.gamLiveConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.video.stitcher.v1.LiveConfig.State[message.state] === undefined ? message.state : $root.google.cloud.video.stitcher.v1.LiveConfig.State[message.state] : message.state; + if (message.adTracking != null && message.hasOwnProperty("adTracking")) + object.adTracking = options.enums === String ? $root.google.cloud.video.stitcher.v1.AdTracking[message.adTracking] === undefined ? message.adTracking : $root.google.cloud.video.stitcher.v1.AdTracking[message.adTracking] : message.adTracking; + if (message.defaultSlate != null && message.hasOwnProperty("defaultSlate")) + object.defaultSlate = message.defaultSlate; + if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) + object.stitchingPolicy = options.enums === String ? $root.google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy[message.stitchingPolicy] === undefined ? message.stitchingPolicy : $root.google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy[message.stitchingPolicy] : message.stitchingPolicy; + if (message.prefetchConfig != null && message.hasOwnProperty("prefetchConfig")) + object.prefetchConfig = $root.google.cloud.video.stitcher.v1.PrefetchConfig.toObject(message.prefetchConfig, options); return object; }; /** - * Converts this VodSession to JSON. + * Converts this LiveConfig to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @instance * @returns {Object.} JSON object */ - VodSession.prototype.toJSON = function toJSON() { + LiveConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VodSession + * Gets the default type url for LiveConfig * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.VodSession + * @memberof google.cloud.video.stitcher.v1.LiveConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VodSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LiveConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSession"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveConfig"; }; - return VodSession; + /** + * State enum. + * @name google.cloud.video.stitcher.v1.LiveConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + */ + LiveConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + return values; + })(); + + /** + * StitchingPolicy enum. + * @name google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy + * @enum {number} + * @property {number} STITCHING_POLICY_UNSPECIFIED=0 STITCHING_POLICY_UNSPECIFIED value + * @property {number} CUT_CURRENT=1 CUT_CURRENT value + * @property {number} COMPLETE_AD=2 COMPLETE_AD value + */ + LiveConfig.StitchingPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STITCHING_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CUT_CURRENT"] = 1; + values[valuesById[2] = "COMPLETE_AD"] = 2; + return values; + })(); + + return LiveConfig; })(); - v1.Interstitials = (function() { + v1.PrefetchConfig = (function() { /** - * Properties of an Interstitials. + * Properties of a PrefetchConfig. * @memberof google.cloud.video.stitcher.v1 - * @interface IInterstitials - * @property {Array.|null} [adBreaks] Interstitials adBreaks - * @property {google.cloud.video.stitcher.v1.IVodSessionContent|null} [sessionContent] Interstitials sessionContent + * @interface IPrefetchConfig + * @property {boolean|null} [enabled] PrefetchConfig enabled + * @property {google.protobuf.IDuration|null} [initialAdRequestDuration] PrefetchConfig initialAdRequestDuration */ /** - * Constructs a new Interstitials. + * Constructs a new PrefetchConfig. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents an Interstitials. - * @implements IInterstitials + * @classdesc Represents a PrefetchConfig. + * @implements IPrefetchConfig * @constructor - * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IPrefetchConfig=} [properties] Properties to set */ - function Interstitials(properties) { - this.adBreaks = []; + function PrefetchConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5039,92 +5129,89 @@ } /** - * Interstitials adBreaks. - * @member {Array.} adBreaks - * @memberof google.cloud.video.stitcher.v1.Interstitials + * PrefetchConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @instance */ - Interstitials.prototype.adBreaks = $util.emptyArray; + PrefetchConfig.prototype.enabled = false; /** - * Interstitials sessionContent. - * @member {google.cloud.video.stitcher.v1.IVodSessionContent|null|undefined} sessionContent - * @memberof google.cloud.video.stitcher.v1.Interstitials + * PrefetchConfig initialAdRequestDuration. + * @member {google.protobuf.IDuration|null|undefined} initialAdRequestDuration + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @instance */ - Interstitials.prototype.sessionContent = null; + PrefetchConfig.prototype.initialAdRequestDuration = null; /** - * Creates a new Interstitials instance using the specified properties. + * Creates a new PrefetchConfig instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static - * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials instance + * @param {google.cloud.video.stitcher.v1.IPrefetchConfig=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.PrefetchConfig} PrefetchConfig instance */ - Interstitials.create = function create(properties) { - return new Interstitials(properties); + PrefetchConfig.create = function create(properties) { + return new PrefetchConfig(properties); }; /** - * Encodes the specified Interstitials message. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * Encodes the specified PrefetchConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.PrefetchConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static - * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IPrefetchConfig} message PrefetchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interstitials.encode = function encode(message, writer) { + PrefetchConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.adBreaks != null && message.adBreaks.length) - for (var i = 0; i < message.adBreaks.length; ++i) - $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.encode(message.adBreaks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sessionContent != null && Object.hasOwnProperty.call(message, "sessionContent")) - $root.google.cloud.video.stitcher.v1.VodSessionContent.encode(message.sessionContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.initialAdRequestDuration != null && Object.hasOwnProperty.call(message, "initialAdRequestDuration")) + $root.google.protobuf.Duration.encode(message.initialAdRequestDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Interstitials message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * Encodes the specified PrefetchConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.PrefetchConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static - * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IPrefetchConfig} message PrefetchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interstitials.encodeDelimited = function encodeDelimited(message, writer) { + PrefetchConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Interstitials message from the specified reader or buffer. + * Decodes a PrefetchConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + * @returns {google.cloud.video.stitcher.v1.PrefetchConfig} PrefetchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interstitials.decode = function decode(reader, length) { + PrefetchConfig.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.stitcher.v1.Interstitials(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.PrefetchConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.adBreaks && message.adBreaks.length)) - message.adBreaks = []; - message.adBreaks.push($root.google.cloud.video.stitcher.v1.VodSessionAdBreak.decode(reader, reader.uint32())); + message.enabled = reader.bool(); break; } case 2: { - message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.decode(reader, reader.uint32()); + message.initialAdRequestDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -5136,156 +5223,138 @@ }; /** - * Decodes an Interstitials message from the specified reader or buffer, length delimited. + * Decodes a PrefetchConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + * @returns {google.cloud.video.stitcher.v1.PrefetchConfig} PrefetchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interstitials.decodeDelimited = function decodeDelimited(reader) { + PrefetchConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Interstitials message. + * Verifies a PrefetchConfig message. * @function verify - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Interstitials.verify = function verify(message) { + PrefetchConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adBreaks != null && message.hasOwnProperty("adBreaks")) { - if (!Array.isArray(message.adBreaks)) - return "adBreaks: array expected"; - for (var i = 0; i < message.adBreaks.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.verify(message.adBreaks[i]); - if (error) - return "adBreaks." + error; - } - } - if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) { - var error = $root.google.cloud.video.stitcher.v1.VodSessionContent.verify(message.sessionContent); + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.initialAdRequestDuration != null && message.hasOwnProperty("initialAdRequestDuration")) { + var error = $root.google.protobuf.Duration.verify(message.initialAdRequestDuration); if (error) - return "sessionContent." + error; + return "initialAdRequestDuration." + error; } return null; }; /** - * Creates an Interstitials message from a plain object. Also converts values to their respective internal types. + * Creates a PrefetchConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + * @returns {google.cloud.video.stitcher.v1.PrefetchConfig} PrefetchConfig */ - Interstitials.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.Interstitials) + PrefetchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.PrefetchConfig) return object; - var message = new $root.google.cloud.video.stitcher.v1.Interstitials(); - if (object.adBreaks) { - if (!Array.isArray(object.adBreaks)) - throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: array expected"); - message.adBreaks = []; - for (var i = 0; i < object.adBreaks.length; ++i) { - if (typeof object.adBreaks[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: object expected"); - message.adBreaks[i] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.fromObject(object.adBreaks[i]); - } - } - if (object.sessionContent != null) { - if (typeof object.sessionContent !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.sessionContent: object expected"); - message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.fromObject(object.sessionContent); + var message = new $root.google.cloud.video.stitcher.v1.PrefetchConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.initialAdRequestDuration != null) { + if (typeof object.initialAdRequestDuration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.PrefetchConfig.initialAdRequestDuration: object expected"); + message.initialAdRequestDuration = $root.google.protobuf.Duration.fromObject(object.initialAdRequestDuration); } return message; }; /** - * Creates a plain object from an Interstitials message. Also converts values to other types if specified. + * Creates a plain object from a PrefetchConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static - * @param {google.cloud.video.stitcher.v1.Interstitials} message Interstitials + * @param {google.cloud.video.stitcher.v1.PrefetchConfig} message PrefetchConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Interstitials.toObject = function toObject(message, options) { + PrefetchConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.adBreaks = []; - if (options.defaults) - object.sessionContent = null; - if (message.adBreaks && message.adBreaks.length) { - object.adBreaks = []; - for (var j = 0; j < message.adBreaks.length; ++j) - object.adBreaks[j] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.toObject(message.adBreaks[j], options); + if (options.defaults) { + object.enabled = false; + object.initialAdRequestDuration = null; } - if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) - object.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.toObject(message.sessionContent, options); + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.initialAdRequestDuration != null && message.hasOwnProperty("initialAdRequestDuration")) + object.initialAdRequestDuration = $root.google.protobuf.Duration.toObject(message.initialAdRequestDuration, options); return object; }; /** - * Converts this Interstitials to JSON. + * Converts this PrefetchConfig to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @instance * @returns {Object.} JSON object */ - Interstitials.prototype.toJSON = function toJSON() { + PrefetchConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Interstitials + * Gets the default type url for PrefetchConfig * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.Interstitials + * @memberof google.cloud.video.stitcher.v1.PrefetchConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Interstitials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrefetchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Interstitials"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.PrefetchConfig"; }; - return Interstitials; + return PrefetchConfig; })(); - v1.VodSessionAd = (function() { + v1.GamLiveConfig = (function() { /** - * Properties of a VodSessionAd. + * Properties of a GamLiveConfig. * @memberof google.cloud.video.stitcher.v1 - * @interface IVodSessionAd - * @property {google.protobuf.IDuration|null} [duration] VodSessionAd duration - * @property {google.cloud.video.stitcher.v1.ICompanionAds|null} [companionAds] VodSessionAd companionAds - * @property {Array.|null} [activityEvents] VodSessionAd activityEvents + * @interface IGamLiveConfig + * @property {string|null} [networkCode] GamLiveConfig networkCode + * @property {string|null} [assetKey] GamLiveConfig assetKey + * @property {string|null} [customAssetKey] GamLiveConfig customAssetKey */ /** - * Constructs a new VodSessionAd. + * Constructs a new GamLiveConfig. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VodSessionAd. - * @implements IVodSessionAd + * @classdesc Represents a GamLiveConfig. + * @implements IGamLiveConfig * @constructor - * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGamLiveConfig=} [properties] Properties to set */ - function VodSessionAd(properties) { - this.activityEvents = []; + function GamLiveConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5293,106 +5362,103 @@ } /** - * VodSessionAd duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * GamLiveConfig networkCode. + * @member {string} networkCode + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @instance */ - VodSessionAd.prototype.duration = null; + GamLiveConfig.prototype.networkCode = ""; /** - * VodSessionAd companionAds. - * @member {google.cloud.video.stitcher.v1.ICompanionAds|null|undefined} companionAds - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * GamLiveConfig assetKey. + * @member {string} assetKey + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @instance */ - VodSessionAd.prototype.companionAds = null; + GamLiveConfig.prototype.assetKey = ""; /** - * VodSessionAd activityEvents. - * @member {Array.} activityEvents - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * GamLiveConfig customAssetKey. + * @member {string} customAssetKey + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @instance */ - VodSessionAd.prototype.activityEvents = $util.emptyArray; + GamLiveConfig.prototype.customAssetKey = ""; /** - * Creates a new VodSessionAd instance using the specified properties. + * Creates a new GamLiveConfig instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd instance + * @param {google.cloud.video.stitcher.v1.IGamLiveConfig=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GamLiveConfig} GamLiveConfig instance */ - VodSessionAd.create = function create(properties) { - return new VodSessionAd(properties); + GamLiveConfig.create = function create(properties) { + return new GamLiveConfig(properties); }; /** - * Encodes the specified VodSessionAd message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * Encodes the specified GamLiveConfig message. Does not implicitly {@link google.cloud.video.stitcher.v1.GamLiveConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGamLiveConfig} message GamLiveConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionAd.encode = function encode(message, writer) { + GamLiveConfig.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.companionAds != null && Object.hasOwnProperty.call(message, "companionAds")) - $root.google.cloud.video.stitcher.v1.CompanionAds.encode(message.companionAds, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.activityEvents != null && message.activityEvents.length) - for (var i = 0; i < message.activityEvents.length; ++i) - $root.google.cloud.video.stitcher.v1.Event.encode(message.activityEvents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.networkCode != null && Object.hasOwnProperty.call(message, "networkCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkCode); + if (message.assetKey != null && Object.hasOwnProperty.call(message, "assetKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetKey); + if (message.customAssetKey != null && Object.hasOwnProperty.call(message, "customAssetKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customAssetKey); return writer; }; /** - * Encodes the specified VodSessionAd message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * Encodes the specified GamLiveConfig message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GamLiveConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGamLiveConfig} message GamLiveConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionAd.encodeDelimited = function encodeDelimited(message, writer) { + GamLiveConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VodSessionAd message from the specified reader or buffer. + * Decodes a GamLiveConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + * @returns {google.cloud.video.stitcher.v1.GamLiveConfig} GamLiveConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionAd.decode = function decode(reader, length) { + GamLiveConfig.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.stitcher.v1.VodSessionAd(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GamLiveConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.networkCode = reader.string(); break; } case 2: { - message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.decode(reader, reader.uint32()); + message.assetKey = reader.string(); break; } case 3: { - if (!(message.activityEvents && message.activityEvents.length)) - message.activityEvents = []; - message.activityEvents.push($root.google.cloud.video.stitcher.v1.Event.decode(reader, reader.uint32())); + message.customAssetKey = reader.string(); break; } default: @@ -5404,167 +5470,149 @@ }; /** - * Decodes a VodSessionAd message from the specified reader or buffer, length delimited. + * Decodes a GamLiveConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + * @returns {google.cloud.video.stitcher.v1.GamLiveConfig} GamLiveConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionAd.decodeDelimited = function decodeDelimited(reader) { + GamLiveConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VodSessionAd message. + * Verifies a GamLiveConfig message. * @function verify - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VodSessionAd.verify = function verify(message) { + GamLiveConfig.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.companionAds != null && message.hasOwnProperty("companionAds")) { - var error = $root.google.cloud.video.stitcher.v1.CompanionAds.verify(message.companionAds); - if (error) - return "companionAds." + error; - } - if (message.activityEvents != null && message.hasOwnProperty("activityEvents")) { - if (!Array.isArray(message.activityEvents)) - return "activityEvents: array expected"; - for (var i = 0; i < message.activityEvents.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.Event.verify(message.activityEvents[i]); - if (error) - return "activityEvents." + error; - } - } + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + if (!$util.isString(message.networkCode)) + return "networkCode: string expected"; + if (message.assetKey != null && message.hasOwnProperty("assetKey")) + if (!$util.isString(message.assetKey)) + return "assetKey: string expected"; + if (message.customAssetKey != null && message.hasOwnProperty("customAssetKey")) + if (!$util.isString(message.customAssetKey)) + return "customAssetKey: string expected"; return null; }; /** - * Creates a VodSessionAd message from a plain object. Also converts values to their respective internal types. + * Creates a GamLiveConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + * @returns {google.cloud.video.stitcher.v1.GamLiveConfig} GamLiveConfig */ - VodSessionAd.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAd) + GamLiveConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GamLiveConfig) return object; - var message = new $root.google.cloud.video.stitcher.v1.VodSessionAd(); - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.companionAds != null) { - if (typeof object.companionAds !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.companionAds: object expected"); - message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.fromObject(object.companionAds); - } - if (object.activityEvents) { - if (!Array.isArray(object.activityEvents)) - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: array expected"); - message.activityEvents = []; - for (var i = 0; i < object.activityEvents.length; ++i) { - if (typeof object.activityEvents[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: object expected"); - message.activityEvents[i] = $root.google.cloud.video.stitcher.v1.Event.fromObject(object.activityEvents[i]); - } - } + var message = new $root.google.cloud.video.stitcher.v1.GamLiveConfig(); + if (object.networkCode != null) + message.networkCode = String(object.networkCode); + if (object.assetKey != null) + message.assetKey = String(object.assetKey); + if (object.customAssetKey != null) + message.customAssetKey = String(object.customAssetKey); return message; }; /** - * Creates a plain object from a VodSessionAd message. Also converts values to other types if specified. + * Creates a plain object from a GamLiveConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static - * @param {google.cloud.video.stitcher.v1.VodSessionAd} message VodSessionAd + * @param {google.cloud.video.stitcher.v1.GamLiveConfig} message GamLiveConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VodSessionAd.toObject = function toObject(message, options) { + GamLiveConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.activityEvents = []; if (options.defaults) { - object.duration = null; - object.companionAds = null; - } - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.companionAds != null && message.hasOwnProperty("companionAds")) - object.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.toObject(message.companionAds, options); - if (message.activityEvents && message.activityEvents.length) { - object.activityEvents = []; - for (var j = 0; j < message.activityEvents.length; ++j) - object.activityEvents[j] = $root.google.cloud.video.stitcher.v1.Event.toObject(message.activityEvents[j], options); - } + object.networkCode = ""; + object.assetKey = ""; + object.customAssetKey = ""; + } + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + object.networkCode = message.networkCode; + if (message.assetKey != null && message.hasOwnProperty("assetKey")) + object.assetKey = message.assetKey; + if (message.customAssetKey != null && message.hasOwnProperty("customAssetKey")) + object.customAssetKey = message.customAssetKey; return object; }; /** - * Converts this VodSessionAd to JSON. + * Converts this GamLiveConfig to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @instance * @returns {Object.} JSON object */ - VodSessionAd.prototype.toJSON = function toJSON() { + GamLiveConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VodSessionAd + * Gets the default type url for GamLiveConfig * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @memberof google.cloud.video.stitcher.v1.GamLiveConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VodSessionAd.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GamLiveConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAd"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GamLiveConfig"; }; - return VodSessionAd; + return GamLiveConfig; })(); - v1.VodSessionContent = (function() { + v1.VodSession = (function() { /** - * Properties of a VodSessionContent. + * Properties of a VodSession. * @memberof google.cloud.video.stitcher.v1 - * @interface IVodSessionContent - * @property {google.protobuf.IDuration|null} [duration] VodSessionContent duration + * @interface IVodSession + * @property {string|null} [name] VodSession name + * @property {google.cloud.video.stitcher.v1.IInterstitials|null} [interstitials] VodSession interstitials + * @property {string|null} [playUri] VodSession playUri + * @property {string|null} [sourceUri] VodSession sourceUri + * @property {string|null} [adTagUri] VodSession adTagUri + * @property {Object.|null} [adTagMacroMap] VodSession adTagMacroMap + * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] VodSession manifestOptions + * @property {string|null} [assetId] VodSession assetId + * @property {google.cloud.video.stitcher.v1.AdTracking|null} [adTracking] VodSession adTracking + * @property {google.cloud.video.stitcher.v1.VodSession.IGamSettings|null} [gamSettings] VodSession gamSettings */ /** - * Constructs a new VodSessionContent. + * Constructs a new VodSession. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VodSessionContent. - * @implements IVodSessionContent + * @classdesc Represents a VodSession. + * @implements IVodSession * @constructor - * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set */ - function VodSessionContent(properties) { + function VodSession(properties) { + this.adTagMacroMap = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5572,75 +5620,221 @@ } /** - * VodSessionContent duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * VodSession name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.VodSession * @instance */ - VodSessionContent.prototype.duration = null; + VodSession.prototype.name = ""; /** - * Creates a new VodSessionContent instance using the specified properties. + * VodSession interstitials. + * @member {google.cloud.video.stitcher.v1.IInterstitials|null|undefined} interstitials + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.interstitials = null; + + /** + * VodSession playUri. + * @member {string} playUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.playUri = ""; + + /** + * VodSession sourceUri. + * @member {string} sourceUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.sourceUri = ""; + + /** + * VodSession adTagUri. + * @member {string} adTagUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.adTagUri = ""; + + /** + * VodSession adTagMacroMap. + * @member {Object.} adTagMacroMap + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.adTagMacroMap = $util.emptyObject; + + /** + * VodSession manifestOptions. + * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.manifestOptions = null; + + /** + * VodSession assetId. + * @member {string} assetId + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.assetId = ""; + + /** + * VodSession adTracking. + * @member {google.cloud.video.stitcher.v1.AdTracking} adTracking + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.adTracking = 0; + + /** + * VodSession gamSettings. + * @member {google.cloud.video.stitcher.v1.VodSession.IGamSettings|null|undefined} gamSettings + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.gamSettings = null; + + /** + * Creates a new VodSession instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent instance + * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession instance */ - VodSessionContent.create = function create(properties) { - return new VodSessionContent(properties); + VodSession.create = function create(properties) { + return new VodSession(properties); }; /** - * Encodes the specified VodSessionContent message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * Encodes the specified VodSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionContent.encode = function encode(message, writer) { + VodSession.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.interstitials != null && Object.hasOwnProperty.call(message, "interstitials")) + $root.google.cloud.video.stitcher.v1.Interstitials.encode(message.interstitials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.playUri != null && Object.hasOwnProperty.call(message, "playUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.playUri); + if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceUri); + if (message.adTagUri != null && Object.hasOwnProperty.call(message, "adTagUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.adTagUri); + if (message.adTagMacroMap != null && Object.hasOwnProperty.call(message, "adTagMacroMap")) + for (var keys = Object.keys(message.adTagMacroMap), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacroMap[keys[i]]).ldelim(); + if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) + $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.assetId); + if (message.adTracking != null && Object.hasOwnProperty.call(message, "adTracking")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.adTracking); + if (message.gamSettings != null && Object.hasOwnProperty.call(message, "gamSettings")) + $root.google.cloud.video.stitcher.v1.VodSession.GamSettings.encode(message.gamSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified VodSessionContent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * Encodes the specified VodSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionContent.encodeDelimited = function encodeDelimited(message, writer) { + VodSession.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VodSessionContent message from the specified reader or buffer. + * Decodes a VodSession message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionContent.decode = function decode(reader, length) { + VodSession.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.stitcher.v1.VodSessionContent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSession(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.decode(reader, reader.uint32()); + break; + } + case 4: { + message.playUri = reader.string(); + break; + } + case 5: { + message.sourceUri = reader.string(); + break; + } + case 6: { + message.adTagUri = reader.string(); + break; + } + case 7: { + if (message.adTagMacroMap === $util.emptyObject) + message.adTagMacroMap = {}; + 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.adTagMacroMap[key] = value; + break; + } + case 9: { + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.assetId = reader.string(); + break; + } + case 11: { + message.adTracking = reader.int32(); + break; + } + case 13: { + message.gamSettings = $root.google.cloud.video.stitcher.v1.VodSession.GamSettings.decode(reader, reader.uint32()); break; } default: @@ -5652,132 +5846,478 @@ }; /** - * Decodes a VodSessionContent message from the specified reader or buffer, length delimited. + * Decodes a VodSession message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionContent.decodeDelimited = function decodeDelimited(reader) { + VodSession.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VodSessionContent message. + * Verifies a VodSession message. * @function verify - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VodSessionContent.verify = function verify(message) { + VodSession.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 (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.interstitials != null && message.hasOwnProperty("interstitials")) { + var error = $root.google.cloud.video.stitcher.v1.Interstitials.verify(message.interstitials); if (error) - return "duration." + error; + return "interstitials." + error; + } + if (message.playUri != null && message.hasOwnProperty("playUri")) + if (!$util.isString(message.playUri)) + return "playUri: string expected"; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + if (!$util.isString(message.sourceUri)) + return "sourceUri: string expected"; + if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) + if (!$util.isString(message.adTagUri)) + return "adTagUri: string expected"; + if (message.adTagMacroMap != null && message.hasOwnProperty("adTagMacroMap")) { + if (!$util.isObject(message.adTagMacroMap)) + return "adTagMacroMap: object expected"; + var key = Object.keys(message.adTagMacroMap); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.adTagMacroMap[key[i]])) + return "adTagMacroMap: string{k:string} expected"; + } + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { + var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); + if (error) + return "manifestOptions." + error; + } + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.adTracking != null && message.hasOwnProperty("adTracking")) + switch (message.adTracking) { + default: + return "adTracking: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gamSettings != null && message.hasOwnProperty("gamSettings")) { + var error = $root.google.cloud.video.stitcher.v1.VodSession.GamSettings.verify(message.gamSettings); + if (error) + return "gamSettings." + error; } return null; }; /** - * Creates a VodSessionContent message from a plain object. Also converts values to their respective internal types. + * Creates a VodSession message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession */ - VodSessionContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionContent) + VodSession.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSession) return object; - var message = new $root.google.cloud.video.stitcher.v1.VodSessionContent(); - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionContent.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + var message = new $root.google.cloud.video.stitcher.v1.VodSession(); + if (object.name != null) + message.name = String(object.name); + if (object.interstitials != null) { + if (typeof object.interstitials !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.interstitials: object expected"); + message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.fromObject(object.interstitials); + } + if (object.playUri != null) + message.playUri = String(object.playUri); + if (object.sourceUri != null) + message.sourceUri = String(object.sourceUri); + if (object.adTagUri != null) + message.adTagUri = String(object.adTagUri); + if (object.adTagMacroMap) { + if (typeof object.adTagMacroMap !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.adTagMacroMap: object expected"); + message.adTagMacroMap = {}; + for (var keys = Object.keys(object.adTagMacroMap), i = 0; i < keys.length; ++i) + message.adTagMacroMap[keys[i]] = String(object.adTagMacroMap[keys[i]]); + } + if (object.manifestOptions != null) { + if (typeof object.manifestOptions !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.manifestOptions: object expected"); + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); + } + if (object.assetId != null) + message.assetId = String(object.assetId); + switch (object.adTracking) { + default: + if (typeof object.adTracking === "number") { + message.adTracking = object.adTracking; + break; + } + break; + case "AD_TRACKING_UNSPECIFIED": + case 0: + message.adTracking = 0; + break; + case "CLIENT": + case 1: + message.adTracking = 1; + break; + case "SERVER": + case 2: + message.adTracking = 2; + break; + } + if (object.gamSettings != null) { + if (typeof object.gamSettings !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.gamSettings: object expected"); + message.gamSettings = $root.google.cloud.video.stitcher.v1.VodSession.GamSettings.fromObject(object.gamSettings); } return message; }; /** - * Creates a plain object from a VodSessionContent message. Also converts values to other types if specified. + * Creates a plain object from a VodSession message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static - * @param {google.cloud.video.stitcher.v1.VodSessionContent} message VodSessionContent + * @param {google.cloud.video.stitcher.v1.VodSession} message VodSession * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VodSessionContent.toObject = function toObject(message, options) { + VodSession.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.duration = null; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (options.objects || options.defaults) + object.adTagMacroMap = {}; + if (options.defaults) { + object.name = ""; + object.interstitials = null; + object.playUri = ""; + object.sourceUri = ""; + object.adTagUri = ""; + object.manifestOptions = null; + object.assetId = ""; + object.adTracking = options.enums === String ? "AD_TRACKING_UNSPECIFIED" : 0; + object.gamSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.interstitials != null && message.hasOwnProperty("interstitials")) + object.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.toObject(message.interstitials, options); + if (message.playUri != null && message.hasOwnProperty("playUri")) + object.playUri = message.playUri; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + object.sourceUri = message.sourceUri; + if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) + object.adTagUri = message.adTagUri; + var keys2; + if (message.adTagMacroMap && (keys2 = Object.keys(message.adTagMacroMap)).length) { + object.adTagMacroMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.adTagMacroMap[keys2[j]] = message.adTagMacroMap[keys2[j]]; + } + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) + object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.adTracking != null && message.hasOwnProperty("adTracking")) + object.adTracking = options.enums === String ? $root.google.cloud.video.stitcher.v1.AdTracking[message.adTracking] === undefined ? message.adTracking : $root.google.cloud.video.stitcher.v1.AdTracking[message.adTracking] : message.adTracking; + if (message.gamSettings != null && message.hasOwnProperty("gamSettings")) + object.gamSettings = $root.google.cloud.video.stitcher.v1.VodSession.GamSettings.toObject(message.gamSettings, options); return object; }; /** - * Converts this VodSessionContent to JSON. + * Converts this VodSession to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @instance * @returns {Object.} JSON object */ - VodSessionContent.prototype.toJSON = function toJSON() { + VodSession.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VodSessionContent + * Gets the default type url for VodSession * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @memberof google.cloud.video.stitcher.v1.VodSession * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VodSessionContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VodSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionContent"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSession"; }; - return VodSessionContent; + VodSession.GamSettings = (function() { + + /** + * Properties of a GamSettings. + * @memberof google.cloud.video.stitcher.v1.VodSession + * @interface IGamSettings + * @property {string|null} [networkCode] GamSettings networkCode + * @property {string|null} [streamId] GamSettings streamId + */ + + /** + * Constructs a new GamSettings. + * @memberof google.cloud.video.stitcher.v1.VodSession + * @classdesc Represents a GamSettings. + * @implements IGamSettings + * @constructor + * @param {google.cloud.video.stitcher.v1.VodSession.IGamSettings=} [properties] Properties to set + */ + function GamSettings(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]]; + } + + /** + * GamSettings networkCode. + * @member {string} networkCode + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @instance + */ + GamSettings.prototype.networkCode = ""; + + /** + * GamSettings streamId. + * @member {string} streamId + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @instance + */ + GamSettings.prototype.streamId = ""; + + /** + * Creates a new GamSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.VodSession.IGamSettings=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSession.GamSettings} GamSettings instance + */ + GamSettings.create = function create(properties) { + return new GamSettings(properties); + }; + + /** + * Encodes the specified GamSettings message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.GamSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.VodSession.IGamSettings} message GamSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkCode != null && Object.hasOwnProperty.call(message, "networkCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkCode); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.streamId); + return writer; + }; + + /** + * Encodes the specified GamSettings message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.GamSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.VodSession.IGamSettings} message GamSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GamSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodSession.GamSettings} GamSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSettings.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.stitcher.v1.VodSession.GamSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkCode = reader.string(); + break; + } + case 2: { + message.streamId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GamSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodSession.GamSettings} GamSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GamSettings message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GamSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + if (!$util.isString(message.networkCode)) + return "networkCode: string expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isString(message.streamId)) + return "streamId: string expected"; + return null; + }; + + /** + * Creates a GamSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodSession.GamSettings} GamSettings + */ + GamSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSession.GamSettings) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodSession.GamSettings(); + if (object.networkCode != null) + message.networkCode = String(object.networkCode); + if (object.streamId != null) + message.streamId = String(object.streamId); + return message; + }; + + /** + * Creates a plain object from a GamSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.VodSession.GamSettings} message GamSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GamSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkCode = ""; + object.streamId = ""; + } + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + object.networkCode = message.networkCode; + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + return object; + }; + + /** + * Converts this GamSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @instance + * @returns {Object.} JSON object + */ + GamSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GamSettings + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodSession.GamSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GamSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSession.GamSettings"; + }; + + return GamSettings; + })(); + + return VodSession; })(); - v1.VodSessionAdBreak = (function() { + v1.Interstitials = (function() { /** - * Properties of a VodSessionAdBreak. + * Properties of an Interstitials. * @memberof google.cloud.video.stitcher.v1 - * @interface IVodSessionAdBreak - * @property {Array.|null} [progressEvents] VodSessionAdBreak progressEvents - * @property {Array.|null} [ads] VodSessionAdBreak ads - * @property {google.protobuf.IDuration|null} [endTimeOffset] VodSessionAdBreak endTimeOffset - * @property {google.protobuf.IDuration|null} [startTimeOffset] VodSessionAdBreak startTimeOffset + * @interface IInterstitials + * @property {Array.|null} [adBreaks] Interstitials adBreaks + * @property {google.cloud.video.stitcher.v1.IVodSessionContent|null} [sessionContent] Interstitials sessionContent */ /** - * Constructs a new VodSessionAdBreak. + * Constructs a new Interstitials. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VodSessionAdBreak. - * @implements IVodSessionAdBreak + * @classdesc Represents an Interstitials. + * @implements IInterstitials * @constructor - * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set */ - function VodSessionAdBreak(properties) { - this.progressEvents = []; - this.ads = []; + function Interstitials(properties) { + this.adBreaks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5785,123 +6325,92 @@ } /** - * VodSessionAdBreak progressEvents. - * @member {Array.} progressEvents - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak - * @instance - */ - VodSessionAdBreak.prototype.progressEvents = $util.emptyArray; - - /** - * VodSessionAdBreak ads. - * @member {Array.} ads - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak - * @instance - */ - VodSessionAdBreak.prototype.ads = $util.emptyArray; - - /** - * VodSessionAdBreak endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * Interstitials adBreaks. + * @member {Array.} adBreaks + * @memberof google.cloud.video.stitcher.v1.Interstitials * @instance */ - VodSessionAdBreak.prototype.endTimeOffset = null; + Interstitials.prototype.adBreaks = $util.emptyArray; /** - * VodSessionAdBreak startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * Interstitials sessionContent. + * @member {google.cloud.video.stitcher.v1.IVodSessionContent|null|undefined} sessionContent + * @memberof google.cloud.video.stitcher.v1.Interstitials * @instance */ - VodSessionAdBreak.prototype.startTimeOffset = null; + Interstitials.prototype.sessionContent = null; /** - * Creates a new VodSessionAdBreak instance using the specified properties. + * Creates a new Interstitials instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak instance + * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials instance */ - VodSessionAdBreak.create = function create(properties) { - return new VodSessionAdBreak(properties); + Interstitials.create = function create(properties) { + return new Interstitials(properties); }; /** - * Encodes the specified VodSessionAdBreak message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * Encodes the specified Interstitials message. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionAdBreak.encode = function encode(message, writer) { + Interstitials.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.progressEvents != null && message.progressEvents.length) - for (var i = 0; i < message.progressEvents.length; ++i) - $root.google.cloud.video.stitcher.v1.ProgressEvent.encode(message.progressEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ads != null && message.ads.length) - for (var i = 0; i < message.ads.length; ++i) - $root.google.cloud.video.stitcher.v1.VodSessionAd.encode(message.ads[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) - $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.adBreaks != null && message.adBreaks.length) + for (var i = 0; i < message.adBreaks.length; ++i) + $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.encode(message.adBreaks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sessionContent != null && Object.hasOwnProperty.call(message, "sessionContent")) + $root.google.cloud.video.stitcher.v1.VodSessionContent.encode(message.sessionContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VodSessionAdBreak message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * Encodes the specified Interstitials message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static - * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodSessionAdBreak.encodeDelimited = function encodeDelimited(message, writer) { + Interstitials.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VodSessionAdBreak message from the specified reader or buffer. + * Decodes an Interstitials message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionAdBreak.decode = function decode(reader, length) { + Interstitials.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.stitcher.v1.VodSessionAdBreak(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Interstitials(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.progressEvents && message.progressEvents.length)) - message.progressEvents = []; - message.progressEvents.push($root.google.cloud.video.stitcher.v1.ProgressEvent.decode(reader, reader.uint32())); + if (!(message.adBreaks && message.adBreaks.length)) + message.adBreaks = []; + message.adBreaks.push($root.google.cloud.video.stitcher.v1.VodSessionAdBreak.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.ads && message.ads.length)) - message.ads = []; - message.ads.push($root.google.cloud.video.stitcher.v1.VodSessionAd.decode(reader, reader.uint32())); - break; - } - case 3: { - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.decode(reader, reader.uint32()); break; } default: @@ -5913,205 +6422,156 @@ }; /** - * Decodes a VodSessionAdBreak message from the specified reader or buffer, length delimited. + * Decodes an Interstitials message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodSessionAdBreak.decodeDelimited = function decodeDelimited(reader) { + Interstitials.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VodSessionAdBreak message. + * Verifies an Interstitials message. * @function verify - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VodSessionAdBreak.verify = function verify(message) { + Interstitials.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.progressEvents != null && message.hasOwnProperty("progressEvents")) { - if (!Array.isArray(message.progressEvents)) - return "progressEvents: array expected"; - for (var i = 0; i < message.progressEvents.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.ProgressEvent.verify(message.progressEvents[i]); - if (error) - return "progressEvents." + error; - } - } - if (message.ads != null && message.hasOwnProperty("ads")) { - if (!Array.isArray(message.ads)) - return "ads: array expected"; - for (var i = 0; i < message.ads.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.VodSessionAd.verify(message.ads[i]); + if (message.adBreaks != null && message.hasOwnProperty("adBreaks")) { + if (!Array.isArray(message.adBreaks)) + return "adBreaks: array expected"; + for (var i = 0; i < message.adBreaks.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.verify(message.adBreaks[i]); if (error) - return "ads." + error; + return "adBreaks." + error; } } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); - if (error) - return "endTimeOffset." + error; - } - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionContent.verify(message.sessionContent); if (error) - return "startTimeOffset." + error; + return "sessionContent." + error; } return null; }; /** - * Creates a VodSessionAdBreak message from a plain object. Also converts values to their respective internal types. + * Creates an Interstitials message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials */ - VodSessionAdBreak.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAdBreak) + Interstitials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Interstitials) return object; - var message = new $root.google.cloud.video.stitcher.v1.VodSessionAdBreak(); - if (object.progressEvents) { - if (!Array.isArray(object.progressEvents)) - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: array expected"); - message.progressEvents = []; - for (var i = 0; i < object.progressEvents.length; ++i) { - if (typeof object.progressEvents[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: object expected"); - message.progressEvents[i] = $root.google.cloud.video.stitcher.v1.ProgressEvent.fromObject(object.progressEvents[i]); - } - } - if (object.ads) { - if (!Array.isArray(object.ads)) - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: array expected"); - message.ads = []; - for (var i = 0; i < object.ads.length; ++i) { - if (typeof object.ads[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: object expected"); - message.ads[i] = $root.google.cloud.video.stitcher.v1.VodSessionAd.fromObject(object.ads[i]); + var message = new $root.google.cloud.video.stitcher.v1.Interstitials(); + if (object.adBreaks) { + if (!Array.isArray(object.adBreaks)) + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: array expected"); + message.adBreaks = []; + for (var i = 0; i < object.adBreaks.length; ++i) { + if (typeof object.adBreaks[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: object expected"); + message.adBreaks[i] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.fromObject(object.adBreaks[i]); } } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.endTimeOffset: object expected"); - message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); - } - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + if (object.sessionContent != null) { + if (typeof object.sessionContent !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.sessionContent: object expected"); + message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.fromObject(object.sessionContent); } return message; }; /** - * Creates a plain object from a VodSessionAdBreak message. Also converts values to other types if specified. + * Creates a plain object from an Interstitials message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static - * @param {google.cloud.video.stitcher.v1.VodSessionAdBreak} message VodSessionAdBreak + * @param {google.cloud.video.stitcher.v1.Interstitials} message Interstitials * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VodSessionAdBreak.toObject = function toObject(message, options) { + Interstitials.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.progressEvents = []; - object.ads = []; - } - if (options.defaults) { - object.endTimeOffset = null; - object.startTimeOffset = null; - } - if (message.progressEvents && message.progressEvents.length) { - object.progressEvents = []; - for (var j = 0; j < message.progressEvents.length; ++j) - object.progressEvents[j] = $root.google.cloud.video.stitcher.v1.ProgressEvent.toObject(message.progressEvents[j], options); - } - if (message.ads && message.ads.length) { - object.ads = []; - for (var j = 0; j < message.ads.length; ++j) - object.ads[j] = $root.google.cloud.video.stitcher.v1.VodSessionAd.toObject(message.ads[j], options); + if (options.arrays || options.defaults) + object.adBreaks = []; + if (options.defaults) + object.sessionContent = null; + if (message.adBreaks && message.adBreaks.length) { + object.adBreaks = []; + for (var j = 0; j < message.adBreaks.length; ++j) + object.adBreaks[j] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.toObject(message.adBreaks[j], options); } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) + object.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.toObject(message.sessionContent, options); return object; }; /** - * Converts this VodSessionAdBreak to JSON. + * Converts this Interstitials to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @instance * @returns {Object.} JSON object */ - VodSessionAdBreak.prototype.toJSON = function toJSON() { + Interstitials.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VodSessionAdBreak + * Gets the default type url for Interstitials * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @memberof google.cloud.video.stitcher.v1.Interstitials * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VodSessionAdBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Interstitials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAdBreak"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Interstitials"; }; - return VodSessionAdBreak; + return Interstitials; })(); - v1.LiveSession = (function() { + v1.VodSessionAd = (function() { /** - * Properties of a LiveSession. + * Properties of a VodSessionAd. * @memberof google.cloud.video.stitcher.v1 - * @interface ILiveSession - * @property {string|null} [name] LiveSession name - * @property {string|null} [playUri] LiveSession playUri - * @property {string|null} [sourceUri] LiveSession sourceUri - * @property {string|null} [defaultAdTagId] LiveSession defaultAdTagId - * @property {Object.|null} [adTagMap] LiveSession adTagMap - * @property {Object.|null} [adTagMacros] LiveSession adTagMacros - * @property {boolean|null} [clientAdTracking] LiveSession clientAdTracking - * @property {string|null} [defaultSlateId] LiveSession defaultSlateId - * @property {google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|null} [stitchingPolicy] LiveSession stitchingPolicy - * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] LiveSession manifestOptions - * @property {string|null} [streamId] LiveSession streamId + * @interface IVodSessionAd + * @property {google.protobuf.IDuration|null} [duration] VodSessionAd duration + * @property {google.cloud.video.stitcher.v1.ICompanionAds|null} [companionAds] VodSessionAd companionAds + * @property {Array.|null} [activityEvents] VodSessionAd activityEvents */ /** - * Constructs a new LiveSession. + * Constructs a new VodSessionAd. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a LiveSession. - * @implements ILiveSession + * @classdesc Represents a VodSessionAd. + * @implements IVodSessionAd * @constructor - * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set */ - function LiveSession(properties) { - this.adTagMap = {}; - this.adTagMacros = {}; + function VodSessionAd(properties) { + this.activityEvents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6119,257 +6579,106 @@ } /** - * LiveSession name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.name = ""; - - /** - * LiveSession playUri. - * @member {string} playUri - * @memberof google.cloud.video.stitcher.v1.LiveSession + * VodSessionAd duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @instance */ - LiveSession.prototype.playUri = ""; + VodSessionAd.prototype.duration = null; /** - * LiveSession sourceUri. - * @member {string} sourceUri - * @memberof google.cloud.video.stitcher.v1.LiveSession + * VodSessionAd companionAds. + * @member {google.cloud.video.stitcher.v1.ICompanionAds|null|undefined} companionAds + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @instance */ - LiveSession.prototype.sourceUri = ""; + VodSessionAd.prototype.companionAds = null; /** - * LiveSession defaultAdTagId. - * @member {string} defaultAdTagId - * @memberof google.cloud.video.stitcher.v1.LiveSession + * VodSessionAd activityEvents. + * @member {Array.} activityEvents + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @instance */ - LiveSession.prototype.defaultAdTagId = ""; + VodSessionAd.prototype.activityEvents = $util.emptyArray; /** - * LiveSession adTagMap. - * @member {Object.} adTagMap - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance + * Creates a new VodSessionAd instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd instance */ - LiveSession.prototype.adTagMap = $util.emptyObject; + VodSessionAd.create = function create(properties) { + return new VodSessionAd(properties); + }; /** - * LiveSession adTagMacros. - * @member {Object.} adTagMacros - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance + * Encodes the specified VodSessionAd message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - LiveSession.prototype.adTagMacros = $util.emptyObject; - - /** - * LiveSession clientAdTracking. - * @member {boolean} clientAdTracking - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.clientAdTracking = false; - - /** - * LiveSession defaultSlateId. - * @member {string} defaultSlateId - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.defaultSlateId = ""; - - /** - * LiveSession stitchingPolicy. - * @member {google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy} stitchingPolicy - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.stitchingPolicy = 0; - - /** - * LiveSession manifestOptions. - * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.manifestOptions = null; - - /** - * LiveSession streamId. - * @member {string} streamId - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @instance - */ - LiveSession.prototype.streamId = ""; - - /** - * Creates a new LiveSession instance using the specified properties. - * @function create - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @static - * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession instance - */ - LiveSession.create = function create(properties) { - return new LiveSession(properties); - }; - - /** - * Encodes the specified LiveSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.stitcher.v1.LiveSession - * @static - * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveSession.encode = function encode(message, writer) { + VodSessionAd.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.playUri != null && Object.hasOwnProperty.call(message, "playUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.playUri); - if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUri); - if (message.defaultAdTagId != null && Object.hasOwnProperty.call(message, "defaultAdTagId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultAdTagId); - if (message.adTagMap != null && Object.hasOwnProperty.call(message, "adTagMap")) - for (var keys = Object.keys(message.adTagMap), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.video.stitcher.v1.AdTag.encode(message.adTagMap[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.adTagMacros != null && Object.hasOwnProperty.call(message, "adTagMacros")) - for (var keys = Object.keys(message.adTagMacros), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacros[keys[i]]).ldelim(); - if (message.clientAdTracking != null && Object.hasOwnProperty.call(message, "clientAdTracking")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.clientAdTracking); - if (message.defaultSlateId != null && Object.hasOwnProperty.call(message, "defaultSlateId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultSlateId); - if (message.stitchingPolicy != null && Object.hasOwnProperty.call(message, "stitchingPolicy")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.stitchingPolicy); - if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) - $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.streamId); + 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.companionAds != null && Object.hasOwnProperty.call(message, "companionAds")) + $root.google.cloud.video.stitcher.v1.CompanionAds.encode(message.companionAds, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.activityEvents != null && message.activityEvents.length) + for (var i = 0; i < message.activityEvents.length; ++i) + $root.google.cloud.video.stitcher.v1.Event.encode(message.activityEvents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LiveSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. + * Encodes the specified VodSessionAd message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static - * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LiveSession.encodeDelimited = function encodeDelimited(message, writer) { + VodSessionAd.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LiveSession message from the specified reader or buffer. + * Decodes a VodSessionAd message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveSession.decode = function decode(reader, length) { + VodSessionAd.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.stitcher.v1.LiveSession(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionAd(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.playUri = reader.string(); + message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.decode(reader, reader.uint32()); break; } case 3: { - message.sourceUri = reader.string(); - break; - } - case 4: { - message.defaultAdTagId = reader.string(); - break; - } - case 5: { - if (message.adTagMap === $util.emptyObject) - message.adTagMap = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.video.stitcher.v1.AdTag.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.adTagMap[key] = value; - break; - } - case 6: { - if (message.adTagMacros === $util.emptyObject) - message.adTagMacros = {}; - 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.adTagMacros[key] = value; - break; - } - case 7: { - message.clientAdTracking = reader.bool(); - break; - } - case 8: { - message.defaultSlateId = reader.string(); - break; - } - case 9: { - message.stitchingPolicy = reader.int32(); - break; - } - case 10: { - message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); - break; - } - case 11: { - message.streamId = reader.string(); + if (!(message.activityEvents && message.activityEvents.length)) + message.activityEvents = []; + message.activityEvents.push($root.google.cloud.video.stitcher.v1.Event.decode(reader, reader.uint32())); break; } default: @@ -6381,282 +6690,167 @@ }; /** - * Decodes a LiveSession message from the specified reader or buffer, length delimited. + * Decodes a VodSessionAd message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LiveSession.decodeDelimited = function decodeDelimited(reader) { + VodSessionAd.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LiveSession message. + * Verifies a VodSessionAd message. * @function verify - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LiveSession.verify = function verify(message) { + VodSessionAd.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.playUri != null && message.hasOwnProperty("playUri")) - if (!$util.isString(message.playUri)) - return "playUri: string expected"; - if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) - if (!$util.isString(message.sourceUri)) - return "sourceUri: string expected"; - if (message.defaultAdTagId != null && message.hasOwnProperty("defaultAdTagId")) - if (!$util.isString(message.defaultAdTagId)) - return "defaultAdTagId: string expected"; - if (message.adTagMap != null && message.hasOwnProperty("adTagMap")) { - if (!$util.isObject(message.adTagMap)) - return "adTagMap: object expected"; - var key = Object.keys(message.adTagMap); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.AdTag.verify(message.adTagMap[key[i]]); - if (error) - return "adTagMap." + error; - } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; } - if (message.adTagMacros != null && message.hasOwnProperty("adTagMacros")) { - if (!$util.isObject(message.adTagMacros)) - return "adTagMacros: object expected"; - var key = Object.keys(message.adTagMacros); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.adTagMacros[key[i]])) - return "adTagMacros: string{k:string} expected"; + if (message.companionAds != null && message.hasOwnProperty("companionAds")) { + var error = $root.google.cloud.video.stitcher.v1.CompanionAds.verify(message.companionAds); + if (error) + return "companionAds." + error; } - if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) - if (typeof message.clientAdTracking !== "boolean") - return "clientAdTracking: boolean expected"; - if (message.defaultSlateId != null && message.hasOwnProperty("defaultSlateId")) - if (!$util.isString(message.defaultSlateId)) - return "defaultSlateId: string expected"; - if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) - switch (message.stitchingPolicy) { - default: - return "stitchingPolicy: enum value expected"; - case 0: - case 1: - case 3: - break; + if (message.activityEvents != null && message.hasOwnProperty("activityEvents")) { + if (!Array.isArray(message.activityEvents)) + return "activityEvents: array expected"; + for (var i = 0; i < message.activityEvents.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Event.verify(message.activityEvents[i]); + if (error) + return "activityEvents." + error; } - if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { - var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); - if (error) - return "manifestOptions." + error; } - if (message.streamId != null && message.hasOwnProperty("streamId")) - if (!$util.isString(message.streamId)) - return "streamId: string expected"; return null; }; /** - * Creates a LiveSession message from a plain object. Also converts values to their respective internal types. + * Creates a VodSessionAd message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd */ - LiveSession.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.LiveSession) + VodSessionAd.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAd) return object; - var message = new $root.google.cloud.video.stitcher.v1.LiveSession(); - if (object.name != null) - message.name = String(object.name); - if (object.playUri != null) - message.playUri = String(object.playUri); - if (object.sourceUri != null) - message.sourceUri = String(object.sourceUri); - if (object.defaultAdTagId != null) - message.defaultAdTagId = String(object.defaultAdTagId); - if (object.adTagMap) { - if (typeof object.adTagMap !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMap: object expected"); - message.adTagMap = {}; - for (var keys = Object.keys(object.adTagMap), i = 0; i < keys.length; ++i) { - if (typeof object.adTagMap[keys[i]] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMap: object expected"); - message.adTagMap[keys[i]] = $root.google.cloud.video.stitcher.v1.AdTag.fromObject(object.adTagMap[keys[i]]); - } + var message = new $root.google.cloud.video.stitcher.v1.VodSessionAd(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); } - if (object.adTagMacros) { - if (typeof object.adTagMacros !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMacros: object expected"); - message.adTagMacros = {}; - for (var keys = Object.keys(object.adTagMacros), i = 0; i < keys.length; ++i) - message.adTagMacros[keys[i]] = String(object.adTagMacros[keys[i]]); + if (object.companionAds != null) { + if (typeof object.companionAds !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.companionAds: object expected"); + message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.fromObject(object.companionAds); } - if (object.clientAdTracking != null) - message.clientAdTracking = Boolean(object.clientAdTracking); - if (object.defaultSlateId != null) - message.defaultSlateId = String(object.defaultSlateId); - switch (object.stitchingPolicy) { - default: - if (typeof object.stitchingPolicy === "number") { - message.stitchingPolicy = object.stitchingPolicy; - break; + if (object.activityEvents) { + if (!Array.isArray(object.activityEvents)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: array expected"); + message.activityEvents = []; + for (var i = 0; i < object.activityEvents.length; ++i) { + if (typeof object.activityEvents[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: object expected"); + message.activityEvents[i] = $root.google.cloud.video.stitcher.v1.Event.fromObject(object.activityEvents[i]); } - break; - case "STITCHING_POLICY_UNSPECIFIED": - case 0: - message.stitchingPolicy = 0; - break; - case "COMPLETE_AD": - case 1: - message.stitchingPolicy = 1; - break; - case "CUT_CURRENT": - case 3: - message.stitchingPolicy = 3; - break; - } - if (object.manifestOptions != null) { - if (typeof object.manifestOptions !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.manifestOptions: object expected"); - message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); } - if (object.streamId != null) - message.streamId = String(object.streamId); return message; }; /** - * Creates a plain object from a LiveSession message. Also converts values to other types if specified. + * Creates a plain object from a VodSessionAd message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static - * @param {google.cloud.video.stitcher.v1.LiveSession} message LiveSession + * @param {google.cloud.video.stitcher.v1.VodSessionAd} message VodSessionAd * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LiveSession.toObject = function toObject(message, options) { + VodSessionAd.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.adTagMap = {}; - object.adTagMacros = {}; - } + if (options.arrays || options.defaults) + object.activityEvents = []; if (options.defaults) { - object.name = ""; - object.playUri = ""; - object.sourceUri = ""; - object.defaultAdTagId = ""; - object.clientAdTracking = false; - object.defaultSlateId = ""; - object.stitchingPolicy = options.enums === String ? "STITCHING_POLICY_UNSPECIFIED" : 0; - object.manifestOptions = null; - object.streamId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.playUri != null && message.hasOwnProperty("playUri")) - object.playUri = message.playUri; - if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) - object.sourceUri = message.sourceUri; - if (message.defaultAdTagId != null && message.hasOwnProperty("defaultAdTagId")) - object.defaultAdTagId = message.defaultAdTagId; - var keys2; - if (message.adTagMap && (keys2 = Object.keys(message.adTagMap)).length) { - object.adTagMap = {}; - for (var j = 0; j < keys2.length; ++j) - object.adTagMap[keys2[j]] = $root.google.cloud.video.stitcher.v1.AdTag.toObject(message.adTagMap[keys2[j]], options); + object.duration = null; + object.companionAds = null; } - if (message.adTagMacros && (keys2 = Object.keys(message.adTagMacros)).length) { - object.adTagMacros = {}; - for (var j = 0; j < keys2.length; ++j) - object.adTagMacros[keys2[j]] = message.adTagMacros[keys2[j]]; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.companionAds != null && message.hasOwnProperty("companionAds")) + object.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.toObject(message.companionAds, options); + if (message.activityEvents && message.activityEvents.length) { + object.activityEvents = []; + for (var j = 0; j < message.activityEvents.length; ++j) + object.activityEvents[j] = $root.google.cloud.video.stitcher.v1.Event.toObject(message.activityEvents[j], options); } - if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) - object.clientAdTracking = message.clientAdTracking; - if (message.defaultSlateId != null && message.hasOwnProperty("defaultSlateId")) - object.defaultSlateId = message.defaultSlateId; - if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) - object.stitchingPolicy = options.enums === String ? $root.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy[message.stitchingPolicy] === undefined ? message.stitchingPolicy : $root.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy[message.stitchingPolicy] : message.stitchingPolicy; - if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) - object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); - if (message.streamId != null && message.hasOwnProperty("streamId")) - object.streamId = message.streamId; return object; }; /** - * Converts this LiveSession to JSON. + * Converts this VodSessionAd to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @instance * @returns {Object.} JSON object */ - LiveSession.prototype.toJSON = function toJSON() { + VodSessionAd.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LiveSession + * Gets the default type url for VodSessionAd * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.LiveSession + * @memberof google.cloud.video.stitcher.v1.VodSessionAd * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LiveSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VodSessionAd.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveSession"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAd"; }; - /** - * StitchingPolicy enum. - * @name google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy - * @enum {number} - * @property {number} STITCHING_POLICY_UNSPECIFIED=0 STITCHING_POLICY_UNSPECIFIED value - * @property {number} COMPLETE_AD=1 COMPLETE_AD value - * @property {number} CUT_CURRENT=3 CUT_CURRENT value - */ - LiveSession.StitchingPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STITCHING_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPLETE_AD"] = 1; - values[valuesById[3] = "CUT_CURRENT"] = 3; - return values; - })(); - - return LiveSession; + return VodSessionAd; })(); - v1.AdTag = (function() { + v1.VodSessionContent = (function() { /** - * Properties of an AdTag. + * Properties of a VodSessionContent. * @memberof google.cloud.video.stitcher.v1 - * @interface IAdTag - * @property {string|null} [uri] AdTag uri + * @interface IVodSessionContent + * @property {google.protobuf.IDuration|null} [duration] VodSessionContent duration */ /** - * Constructs a new AdTag. + * Constructs a new VodSessionContent. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents an AdTag. - * @implements IAdTag + * @classdesc Represents a VodSessionContent. + * @implements IVodSessionContent * @constructor - * @param {google.cloud.video.stitcher.v1.IAdTag=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set */ - function AdTag(properties) { + function VodSessionContent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6664,75 +6858,75 @@ } /** - * AdTag uri. - * @member {string} uri - * @memberof google.cloud.video.stitcher.v1.AdTag + * VodSessionContent duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @instance */ - AdTag.prototype.uri = ""; + VodSessionContent.prototype.duration = null; /** - * Creates a new AdTag instance using the specified properties. + * Creates a new VodSessionContent instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static - * @param {google.cloud.video.stitcher.v1.IAdTag=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag instance + * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent instance */ - AdTag.create = function create(properties) { - return new AdTag(properties); + VodSessionContent.create = function create(properties) { + return new VodSessionContent(properties); }; /** - * Encodes the specified AdTag message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * Encodes the specified VodSessionContent message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static - * @param {google.cloud.video.stitcher.v1.IAdTag} message AdTag message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdTag.encode = function encode(message, writer) { + VodSessionContent.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); + 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(); return writer; }; /** - * Encodes the specified AdTag message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * Encodes the specified VodSessionContent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static - * @param {google.cloud.video.stitcher.v1.IAdTag} message AdTag message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdTag.encodeDelimited = function encodeDelimited(message, writer) { + VodSessionContent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdTag message from the specified reader or buffer. + * Decodes a VodSessionContent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdTag.decode = function decode(reader, length) { + VodSessionContent.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.stitcher.v1.AdTag(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionContent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.uri = reader.string(); + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -6744,124 +6938,132 @@ }; /** - * Decodes an AdTag message from the specified reader or buffer, length delimited. + * Decodes a VodSessionContent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdTag.decodeDelimited = function decodeDelimited(reader) { + VodSessionContent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdTag message. + * Verifies a VodSessionContent message. * @function verify - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdTag.verify = function verify(message) { + VodSessionContent.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"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } return null; }; /** - * Creates an AdTag message from a plain object. Also converts values to their respective internal types. + * Creates a VodSessionContent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent */ - AdTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.AdTag) + VodSessionContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionContent) return object; - var message = new $root.google.cloud.video.stitcher.v1.AdTag(); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.video.stitcher.v1.VodSessionContent(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionContent.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } return message; }; /** - * Creates a plain object from an AdTag message. Also converts values to other types if specified. + * Creates a plain object from a VodSessionContent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static - * @param {google.cloud.video.stitcher.v1.AdTag} message AdTag + * @param {google.cloud.video.stitcher.v1.VodSessionContent} message VodSessionContent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdTag.toObject = function toObject(message, options) { + VodSessionContent.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; + object.duration = null; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); return object; }; /** - * Converts this AdTag to JSON. + * Converts this VodSessionContent to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @instance * @returns {Object.} JSON object */ - AdTag.prototype.toJSON = function toJSON() { + VodSessionContent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdTag + * Gets the default type url for VodSessionContent * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.AdTag + * @memberof google.cloud.video.stitcher.v1.VodSessionContent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VodSessionContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdTag"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionContent"; }; - return AdTag; + return VodSessionContent; })(); - v1.ManifestOptions = (function() { + v1.VodSessionAdBreak = (function() { /** - * Properties of a ManifestOptions. + * Properties of a VodSessionAdBreak. * @memberof google.cloud.video.stitcher.v1 - * @interface IManifestOptions - * @property {Array.|null} [includeRenditions] ManifestOptions includeRenditions - * @property {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|null} [bitrateOrder] ManifestOptions bitrateOrder + * @interface IVodSessionAdBreak + * @property {Array.|null} [progressEvents] VodSessionAdBreak progressEvents + * @property {Array.|null} [ads] VodSessionAdBreak ads + * @property {google.protobuf.IDuration|null} [endTimeOffset] VodSessionAdBreak endTimeOffset + * @property {google.protobuf.IDuration|null} [startTimeOffset] VodSessionAdBreak startTimeOffset */ /** - * Constructs a new ManifestOptions. + * Constructs a new VodSessionAdBreak. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ManifestOptions. - * @implements IManifestOptions + * @classdesc Represents a VodSessionAdBreak. + * @implements IVodSessionAdBreak * @constructor - * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set */ - function ManifestOptions(properties) { - this.includeRenditions = []; + function VodSessionAdBreak(properties) { + this.progressEvents = []; + this.ads = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6869,92 +7071,123 @@ } /** - * ManifestOptions includeRenditions. - * @member {Array.} includeRenditions - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * VodSessionAdBreak progressEvents. + * @member {Array.} progressEvents + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @instance */ - ManifestOptions.prototype.includeRenditions = $util.emptyArray; + VodSessionAdBreak.prototype.progressEvents = $util.emptyArray; /** - * ManifestOptions bitrateOrder. - * @member {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy} bitrateOrder - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * VodSessionAdBreak ads. + * @member {Array.} ads + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @instance */ - ManifestOptions.prototype.bitrateOrder = 0; + VodSessionAdBreak.prototype.ads = $util.emptyArray; /** - * Creates a new ManifestOptions instance using the specified properties. + * VodSessionAdBreak endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.endTimeOffset = null; + + /** + * VodSessionAdBreak startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.startTimeOffset = null; + + /** + * Creates a new VodSessionAdBreak instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static - * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions instance + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak instance */ - ManifestOptions.create = function create(properties) { - return new ManifestOptions(properties); + VodSessionAdBreak.create = function create(properties) { + return new VodSessionAdBreak(properties); }; /** - * Encodes the specified ManifestOptions message. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * Encodes the specified VodSessionAdBreak message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static - * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ManifestOptions.encode = function encode(message, writer) { + VodSessionAdBreak.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeRenditions != null && message.includeRenditions.length) - for (var i = 0; i < message.includeRenditions.length; ++i) - $root.google.cloud.video.stitcher.v1.RenditionFilter.encode(message.includeRenditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bitrateOrder != null && Object.hasOwnProperty.call(message, "bitrateOrder")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateOrder); + if (message.progressEvents != null && message.progressEvents.length) + for (var i = 0; i < message.progressEvents.length; ++i) + $root.google.cloud.video.stitcher.v1.ProgressEvent.encode(message.progressEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ads != null && message.ads.length) + for (var i = 0; i < message.ads.length; ++i) + $root.google.cloud.video.stitcher.v1.VodSessionAd.encode(message.ads[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ManifestOptions message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * Encodes the specified VodSessionAdBreak message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static - * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ManifestOptions.encodeDelimited = function encodeDelimited(message, writer) { + VodSessionAdBreak.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ManifestOptions message from the specified reader or buffer. + * Decodes a VodSessionAdBreak message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ManifestOptions.decode = function decode(reader, length) { + VodSessionAdBreak.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.stitcher.v1.ManifestOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionAdBreak(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.includeRenditions && message.includeRenditions.length)) - message.includeRenditions = []; - message.includeRenditions.push($root.google.cloud.video.stitcher.v1.RenditionFilter.decode(reader, reader.uint32())); + if (!(message.progressEvents && message.progressEvents.length)) + message.progressEvents = []; + message.progressEvents.push($root.google.cloud.video.stitcher.v1.ProgressEvent.decode(reader, reader.uint32())); break; } case 2: { - message.bitrateOrder = reader.int32(); + if (!(message.ads && message.ads.length)) + message.ads = []; + message.ads.push($root.google.cloud.video.stitcher.v1.VodSessionAd.decode(reader, reader.uint32())); + break; + } + case 3: { + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -6966,189 +7199,199 @@ }; /** - * Decodes a ManifestOptions message from the specified reader or buffer, length delimited. + * Decodes a VodSessionAdBreak message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ManifestOptions.decodeDelimited = function decodeDelimited(reader) { + VodSessionAdBreak.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ManifestOptions message. + * Verifies a VodSessionAdBreak message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ManifestOptions.verify = function verify(message) { + VodSessionAdBreak.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.includeRenditions != null && message.hasOwnProperty("includeRenditions")) { - if (!Array.isArray(message.includeRenditions)) - return "includeRenditions: array expected"; - for (var i = 0; i < message.includeRenditions.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.RenditionFilter.verify(message.includeRenditions[i]); + if (message.progressEvents != null && message.hasOwnProperty("progressEvents")) { + if (!Array.isArray(message.progressEvents)) + return "progressEvents: array expected"; + for (var i = 0; i < message.progressEvents.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.ProgressEvent.verify(message.progressEvents[i]); if (error) - return "includeRenditions." + error; + return "progressEvents." + error; } } - if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) - switch (message.bitrateOrder) { - default: - return "bitrateOrder: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.ads != null && message.hasOwnProperty("ads")) { + if (!Array.isArray(message.ads)) + return "ads: array expected"; + for (var i = 0; i < message.ads.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionAd.verify(message.ads[i]); + if (error) + return "ads." + error; } + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } return null; }; /** - * Creates a ManifestOptions message from a plain object. Also converts values to their respective internal types. + * Creates a VodSessionAdBreak message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak */ - ManifestOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ManifestOptions) + VodSessionAdBreak.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAdBreak) return object; - var message = new $root.google.cloud.video.stitcher.v1.ManifestOptions(); - if (object.includeRenditions) { - if (!Array.isArray(object.includeRenditions)) - throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: array expected"); - message.includeRenditions = []; - for (var i = 0; i < object.includeRenditions.length; ++i) { - if (typeof object.includeRenditions[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: object expected"); - message.includeRenditions[i] = $root.google.cloud.video.stitcher.v1.RenditionFilter.fromObject(object.includeRenditions[i]); + var message = new $root.google.cloud.video.stitcher.v1.VodSessionAdBreak(); + if (object.progressEvents) { + if (!Array.isArray(object.progressEvents)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: array expected"); + message.progressEvents = []; + for (var i = 0; i < object.progressEvents.length; ++i) { + if (typeof object.progressEvents[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: object expected"); + message.progressEvents[i] = $root.google.cloud.video.stitcher.v1.ProgressEvent.fromObject(object.progressEvents[i]); } } - switch (object.bitrateOrder) { - default: - if (typeof object.bitrateOrder === "number") { - message.bitrateOrder = object.bitrateOrder; - break; + if (object.ads) { + if (!Array.isArray(object.ads)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: array expected"); + message.ads = []; + for (var i = 0; i < object.ads.length; ++i) { + if (typeof object.ads[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: object expected"); + message.ads[i] = $root.google.cloud.video.stitcher.v1.VodSessionAd.fromObject(object.ads[i]); } - break; - case "ORDER_POLICY_UNSPECIFIED": - case 0: - message.bitrateOrder = 0; - break; - case "ASCENDING": - case 1: - message.bitrateOrder = 1; - break; - case "DESCENDING": - case 2: - message.bitrateOrder = 2; - break; + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); } return message; }; /** - * Creates a plain object from a ManifestOptions message. Also converts values to other types if specified. + * Creates a plain object from a VodSessionAdBreak message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static - * @param {google.cloud.video.stitcher.v1.ManifestOptions} message ManifestOptions + * @param {google.cloud.video.stitcher.v1.VodSessionAdBreak} message VodSessionAdBreak * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ManifestOptions.toObject = function toObject(message, options) { + VodSessionAdBreak.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.includeRenditions = []; - if (options.defaults) - object.bitrateOrder = options.enums === String ? "ORDER_POLICY_UNSPECIFIED" : 0; - if (message.includeRenditions && message.includeRenditions.length) { - object.includeRenditions = []; - for (var j = 0; j < message.includeRenditions.length; ++j) - object.includeRenditions[j] = $root.google.cloud.video.stitcher.v1.RenditionFilter.toObject(message.includeRenditions[j], options); + if (options.arrays || options.defaults) { + object.progressEvents = []; + object.ads = []; } - if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) - object.bitrateOrder = options.enums === String ? $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] === undefined ? message.bitrateOrder : $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] : message.bitrateOrder; + if (options.defaults) { + object.endTimeOffset = null; + object.startTimeOffset = null; + } + if (message.progressEvents && message.progressEvents.length) { + object.progressEvents = []; + for (var j = 0; j < message.progressEvents.length; ++j) + object.progressEvents[j] = $root.google.cloud.video.stitcher.v1.ProgressEvent.toObject(message.progressEvents[j], options); + } + if (message.ads && message.ads.length) { + object.ads = []; + for (var j = 0; j < message.ads.length; ++j) + object.ads[j] = $root.google.cloud.video.stitcher.v1.VodSessionAd.toObject(message.ads[j], options); + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); return object; }; /** - * Converts this ManifestOptions to JSON. + * Converts this VodSessionAdBreak to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @instance * @returns {Object.} JSON object */ - ManifestOptions.prototype.toJSON = function toJSON() { + VodSessionAdBreak.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ManifestOptions + * Gets the default type url for VodSessionAdBreak * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ManifestOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VodSessionAdBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ManifestOptions"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAdBreak"; }; - /** - * OrderPolicy enum. - * @name google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy - * @enum {number} - * @property {number} ORDER_POLICY_UNSPECIFIED=0 ORDER_POLICY_UNSPECIFIED value - * @property {number} ASCENDING=1 ASCENDING value - * @property {number} DESCENDING=2 DESCENDING value - */ - ManifestOptions.OrderPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ASCENDING"] = 1; - values[valuesById[2] = "DESCENDING"] = 2; - return values; - })(); - - return ManifestOptions; + return VodSessionAdBreak; })(); - v1.RenditionFilter = (function() { + v1.LiveSession = (function() { /** - * Properties of a RenditionFilter. + * Properties of a LiveSession. * @memberof google.cloud.video.stitcher.v1 - * @interface IRenditionFilter - * @property {number|null} [bitrateBps] RenditionFilter bitrateBps - * @property {string|null} [codecs] RenditionFilter codecs + * @interface ILiveSession + * @property {string|null} [name] LiveSession name + * @property {string|null} [playUri] LiveSession playUri + * @property {Object.|null} [adTagMacros] LiveSession adTagMacros + * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] LiveSession manifestOptions + * @property {google.cloud.video.stitcher.v1.LiveSession.IGamSettings|null} [gamSettings] LiveSession gamSettings + * @property {string|null} [liveConfig] LiveSession liveConfig */ /** - * Constructs a new RenditionFilter. + * Constructs a new LiveSession. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a RenditionFilter. - * @implements IRenditionFilter + * @classdesc Represents a LiveSession. + * @implements ILiveSession * @constructor - * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set */ - function RenditionFilter(properties) { + function LiveSession(properties) { + this.adTagMacros = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7156,89 +7399,165 @@ } /** - * RenditionFilter bitrateBps. - * @member {number} bitrateBps - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * LiveSession name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.LiveSession * @instance */ - RenditionFilter.prototype.bitrateBps = 0; + LiveSession.prototype.name = ""; /** - * RenditionFilter codecs. - * @member {string} codecs - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * LiveSession playUri. + * @member {string} playUri + * @memberof google.cloud.video.stitcher.v1.LiveSession * @instance */ - RenditionFilter.prototype.codecs = ""; + LiveSession.prototype.playUri = ""; /** - * Creates a new RenditionFilter instance using the specified properties. + * LiveSession adTagMacros. + * @member {Object.} adTagMacros + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.adTagMacros = $util.emptyObject; + + /** + * LiveSession manifestOptions. + * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.manifestOptions = null; + + /** + * LiveSession gamSettings. + * @member {google.cloud.video.stitcher.v1.LiveSession.IGamSettings|null|undefined} gamSettings + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.gamSettings = null; + + /** + * LiveSession liveConfig. + * @member {string} liveConfig + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.liveConfig = ""; + + /** + * Creates a new LiveSession instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static - * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter instance + * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession instance */ - RenditionFilter.create = function create(properties) { - return new RenditionFilter(properties); + LiveSession.create = function create(properties) { + return new LiveSession(properties); }; /** - * Encodes the specified RenditionFilter message. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * Encodes the specified LiveSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static - * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RenditionFilter.encode = function encode(message, writer) { + LiveSession.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.bitrateBps); - if (message.codecs != null && Object.hasOwnProperty.call(message, "codecs")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.codecs); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.playUri != null && Object.hasOwnProperty.call(message, "playUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.playUri); + if (message.adTagMacros != null && Object.hasOwnProperty.call(message, "adTagMacros")) + for (var keys = Object.keys(message.adTagMacros), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacros[keys[i]]).ldelim(); + if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) + $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.gamSettings != null && Object.hasOwnProperty.call(message, "gamSettings")) + $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings.encode(message.gamSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.liveConfig != null && Object.hasOwnProperty.call(message, "liveConfig")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.liveConfig); return writer; }; /** - * Encodes the specified RenditionFilter message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * Encodes the specified LiveSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static - * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RenditionFilter.encodeDelimited = function encodeDelimited(message, writer) { + LiveSession.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RenditionFilter message from the specified reader or buffer. + * Decodes a LiveSession message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RenditionFilter.decode = function decode(reader, length) { + LiveSession.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.stitcher.v1.RenditionFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.LiveSession(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bitrateBps = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.codecs = reader.string(); + message.playUri = reader.string(); + break; + } + case 6: { + if (message.adTagMacros === $util.emptyObject) + message.adTagMacros = {}; + 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.adTagMacros[key] = value; + break; + } + case 10: { + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); + break; + } + case 15: { + message.gamSettings = $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + message.liveConfig = reader.string(); break; } default: @@ -7250,132 +7569,393 @@ }; /** - * Decodes a RenditionFilter message from the specified reader or buffer, length delimited. + * Decodes a LiveSession message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RenditionFilter.decodeDelimited = function decodeDelimited(reader) { + LiveSession.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RenditionFilter message. + * Verifies a LiveSession message. * @function verify - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RenditionFilter.verify = function verify(message) { + LiveSession.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - if (!$util.isInteger(message.bitrateBps)) - return "bitrateBps: integer expected"; - if (message.codecs != null && message.hasOwnProperty("codecs")) - if (!$util.isString(message.codecs)) - return "codecs: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.playUri != null && message.hasOwnProperty("playUri")) + if (!$util.isString(message.playUri)) + return "playUri: string expected"; + if (message.adTagMacros != null && message.hasOwnProperty("adTagMacros")) { + if (!$util.isObject(message.adTagMacros)) + return "adTagMacros: object expected"; + var key = Object.keys(message.adTagMacros); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.adTagMacros[key[i]])) + return "adTagMacros: string{k:string} expected"; + } + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { + var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); + if (error) + return "manifestOptions." + error; + } + if (message.gamSettings != null && message.hasOwnProperty("gamSettings")) { + var error = $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings.verify(message.gamSettings); + if (error) + return "gamSettings." + error; + } + if (message.liveConfig != null && message.hasOwnProperty("liveConfig")) + if (!$util.isString(message.liveConfig)) + return "liveConfig: string expected"; return null; }; /** - * Creates a RenditionFilter message from a plain object. Also converts values to their respective internal types. + * Creates a LiveSession message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession */ - RenditionFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.RenditionFilter) + LiveSession.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.LiveSession) return object; - var message = new $root.google.cloud.video.stitcher.v1.RenditionFilter(); - if (object.bitrateBps != null) - message.bitrateBps = object.bitrateBps | 0; - if (object.codecs != null) - message.codecs = String(object.codecs); + var message = new $root.google.cloud.video.stitcher.v1.LiveSession(); + if (object.name != null) + message.name = String(object.name); + if (object.playUri != null) + message.playUri = String(object.playUri); + if (object.adTagMacros) { + if (typeof object.adTagMacros !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMacros: object expected"); + message.adTagMacros = {}; + for (var keys = Object.keys(object.adTagMacros), i = 0; i < keys.length; ++i) + message.adTagMacros[keys[i]] = String(object.adTagMacros[keys[i]]); + } + if (object.manifestOptions != null) { + if (typeof object.manifestOptions !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.manifestOptions: object expected"); + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); + } + if (object.gamSettings != null) { + if (typeof object.gamSettings !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.gamSettings: object expected"); + message.gamSettings = $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings.fromObject(object.gamSettings); + } + if (object.liveConfig != null) + message.liveConfig = String(object.liveConfig); return message; }; /** - * Creates a plain object from a RenditionFilter message. Also converts values to other types if specified. + * Creates a plain object from a LiveSession message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static - * @param {google.cloud.video.stitcher.v1.RenditionFilter} message RenditionFilter + * @param {google.cloud.video.stitcher.v1.LiveSession} message LiveSession * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RenditionFilter.toObject = function toObject(message, options) { + LiveSession.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.adTagMacros = {}; if (options.defaults) { - object.bitrateBps = 0; - object.codecs = ""; + object.name = ""; + object.playUri = ""; + object.manifestOptions = null; + object.gamSettings = null; + object.liveConfig = ""; } - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - object.bitrateBps = message.bitrateBps; - if (message.codecs != null && message.hasOwnProperty("codecs")) - object.codecs = message.codecs; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.playUri != null && message.hasOwnProperty("playUri")) + object.playUri = message.playUri; + var keys2; + if (message.adTagMacros && (keys2 = Object.keys(message.adTagMacros)).length) { + object.adTagMacros = {}; + for (var j = 0; j < keys2.length; ++j) + object.adTagMacros[keys2[j]] = message.adTagMacros[keys2[j]]; + } + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) + object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); + if (message.gamSettings != null && message.hasOwnProperty("gamSettings")) + object.gamSettings = $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings.toObject(message.gamSettings, options); + if (message.liveConfig != null && message.hasOwnProperty("liveConfig")) + object.liveConfig = message.liveConfig; return object; }; /** - * Converts this RenditionFilter to JSON. + * Converts this LiveSession to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @instance * @returns {Object.} JSON object */ - RenditionFilter.prototype.toJSON = function toJSON() { + LiveSession.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RenditionFilter + * Gets the default type url for LiveSession * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @memberof google.cloud.video.stitcher.v1.LiveSession * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RenditionFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LiveSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.RenditionFilter"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveSession"; }; - return RenditionFilter; + LiveSession.GamSettings = (function() { + + /** + * Properties of a GamSettings. + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @interface IGamSettings + * @property {string|null} [streamId] GamSettings streamId + */ + + /** + * Constructs a new GamSettings. + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @classdesc Represents a GamSettings. + * @implements IGamSettings + * @constructor + * @param {google.cloud.video.stitcher.v1.LiveSession.IGamSettings=} [properties] Properties to set + */ + function GamSettings(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]]; + } + + /** + * GamSettings streamId. + * @member {string} streamId + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @instance + */ + GamSettings.prototype.streamId = ""; + + /** + * Creates a new GamSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.LiveSession.IGamSettings=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.LiveSession.GamSettings} GamSettings instance + */ + GamSettings.create = function create(properties) { + return new GamSettings(properties); + }; + + /** + * Encodes the specified GamSettings message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.GamSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.LiveSession.IGamSettings} message GamSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.streamId); + return writer; + }; + + /** + * Encodes the specified GamSettings message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.GamSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.LiveSession.IGamSettings} message GamSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GamSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.LiveSession.GamSettings} GamSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSettings.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.stitcher.v1.LiveSession.GamSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.streamId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GamSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.LiveSession.GamSettings} GamSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GamSettings message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GamSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isString(message.streamId)) + return "streamId: string expected"; + return null; + }; + + /** + * Creates a GamSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.LiveSession.GamSettings} GamSettings + */ + GamSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings) + return object; + var message = new $root.google.cloud.video.stitcher.v1.LiveSession.GamSettings(); + if (object.streamId != null) + message.streamId = String(object.streamId); + return message; + }; + + /** + * Creates a plain object from a GamSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {google.cloud.video.stitcher.v1.LiveSession.GamSettings} message GamSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GamSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.streamId = ""; + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + return object; + }; + + /** + * Converts this GamSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @instance + * @returns {Object.} JSON object + */ + GamSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GamSettings + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.LiveSession.GamSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GamSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveSession.GamSettings"; + }; + + return GamSettings; + })(); + + return LiveSession; })(); - v1.Slate = (function() { + v1.ManifestOptions = (function() { /** - * Properties of a Slate. + * Properties of a ManifestOptions. * @memberof google.cloud.video.stitcher.v1 - * @interface ISlate - * @property {string|null} [name] Slate name - * @property {string|null} [uri] Slate uri + * @interface IManifestOptions + * @property {Array.|null} [includeRenditions] ManifestOptions includeRenditions + * @property {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|null} [bitrateOrder] ManifestOptions bitrateOrder */ /** - * Constructs a new Slate. + * Constructs a new ManifestOptions. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a Slate. - * @implements ISlate + * @classdesc Represents a ManifestOptions. + * @implements IManifestOptions * @constructor - * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set */ - function Slate(properties) { + function ManifestOptions(properties) { + this.includeRenditions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7383,89 +7963,92 @@ } /** - * Slate name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.Slate + * ManifestOptions includeRenditions. + * @member {Array.} includeRenditions + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @instance */ - Slate.prototype.name = ""; + ManifestOptions.prototype.includeRenditions = $util.emptyArray; /** - * Slate uri. - * @member {string} uri - * @memberof google.cloud.video.stitcher.v1.Slate + * ManifestOptions bitrateOrder. + * @member {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy} bitrateOrder + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @instance */ - Slate.prototype.uri = ""; + ManifestOptions.prototype.bitrateOrder = 0; /** - * Creates a new Slate instance using the specified properties. + * Creates a new ManifestOptions instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static - * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.Slate} Slate instance + * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions instance */ - Slate.create = function create(properties) { - return new Slate(properties); + ManifestOptions.create = function create(properties) { + return new ManifestOptions(properties); }; /** - * Encodes the specified Slate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * Encodes the specified ManifestOptions message. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static - * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Slate.encode = function encode(message, writer) { + ManifestOptions.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.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.includeRenditions != null && message.includeRenditions.length) + for (var i = 0; i < message.includeRenditions.length; ++i) + $root.google.cloud.video.stitcher.v1.RenditionFilter.encode(message.includeRenditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bitrateOrder != null && Object.hasOwnProperty.call(message, "bitrateOrder")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateOrder); return writer; }; /** - * Encodes the specified Slate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * Encodes the specified ManifestOptions message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static - * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Slate.encodeDelimited = function encodeDelimited(message, writer) { + ManifestOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Slate message from the specified reader or buffer. + * Decodes a ManifestOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.Slate} Slate + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Slate.decode = function decode(reader, length) { + ManifestOptions.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.stitcher.v1.Slate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ManifestOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.includeRenditions && message.includeRenditions.length)) + message.includeRenditions = []; + message.includeRenditions.push($root.google.cloud.video.stitcher.v1.RenditionFilter.decode(reader, reader.uint32())); break; } case 2: { - message.uri = reader.string(); + message.bitrateOrder = reader.int32(); break; } default: @@ -7477,133 +8060,189 @@ }; /** - * Decodes a Slate message from the specified reader or buffer, length delimited. + * Decodes a ManifestOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.Slate} Slate + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Slate.decodeDelimited = function decodeDelimited(reader) { + ManifestOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Slate message. + * Verifies a ManifestOptions message. * @function verify - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Slate.verify = function verify(message) { + ManifestOptions.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.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.includeRenditions != null && message.hasOwnProperty("includeRenditions")) { + if (!Array.isArray(message.includeRenditions)) + return "includeRenditions: array expected"; + for (var i = 0; i < message.includeRenditions.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.RenditionFilter.verify(message.includeRenditions[i]); + if (error) + return "includeRenditions." + error; + } + } + if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) + switch (message.bitrateOrder) { + default: + return "bitrateOrder: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Slate message from a plain object. Also converts values to their respective internal types. + * Creates a ManifestOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.Slate} Slate + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions */ - Slate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.Slate) + ManifestOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ManifestOptions) return object; - var message = new $root.google.cloud.video.stitcher.v1.Slate(); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.video.stitcher.v1.ManifestOptions(); + if (object.includeRenditions) { + if (!Array.isArray(object.includeRenditions)) + throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: array expected"); + message.includeRenditions = []; + for (var i = 0; i < object.includeRenditions.length; ++i) { + if (typeof object.includeRenditions[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: object expected"); + message.includeRenditions[i] = $root.google.cloud.video.stitcher.v1.RenditionFilter.fromObject(object.includeRenditions[i]); + } + } + switch (object.bitrateOrder) { + default: + if (typeof object.bitrateOrder === "number") { + message.bitrateOrder = object.bitrateOrder; + break; + } + break; + case "ORDER_POLICY_UNSPECIFIED": + case 0: + message.bitrateOrder = 0; + break; + case "ASCENDING": + case 1: + message.bitrateOrder = 1; + break; + case "DESCENDING": + case 2: + message.bitrateOrder = 2; + break; + } return message; }; /** - * Creates a plain object from a Slate message. Also converts values to other types if specified. + * Creates a plain object from a ManifestOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static - * @param {google.cloud.video.stitcher.v1.Slate} message Slate + * @param {google.cloud.video.stitcher.v1.ManifestOptions} message ManifestOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Slate.toObject = function toObject(message, options) { + ManifestOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.uri = ""; + if (options.arrays || options.defaults) + object.includeRenditions = []; + if (options.defaults) + object.bitrateOrder = options.enums === String ? "ORDER_POLICY_UNSPECIFIED" : 0; + if (message.includeRenditions && message.includeRenditions.length) { + object.includeRenditions = []; + for (var j = 0; j < message.includeRenditions.length; ++j) + object.includeRenditions[j] = $root.google.cloud.video.stitcher.v1.RenditionFilter.toObject(message.includeRenditions[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; + if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) + object.bitrateOrder = options.enums === String ? $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] === undefined ? message.bitrateOrder : $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] : message.bitrateOrder; return object; }; /** - * Converts this Slate to JSON. + * Converts this ManifestOptions to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @instance * @returns {Object.} JSON object */ - Slate.prototype.toJSON = function toJSON() { + ManifestOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Slate + * Gets the default type url for ManifestOptions * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.Slate + * @memberof google.cloud.video.stitcher.v1.ManifestOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Slate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ManifestOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Slate"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ManifestOptions"; }; - return Slate; + /** + * OrderPolicy enum. + * @name google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy + * @enum {number} + * @property {number} ORDER_POLICY_UNSPECIFIED=0 ORDER_POLICY_UNSPECIFIED value + * @property {number} ASCENDING=1 ASCENDING value + * @property {number} DESCENDING=2 DESCENDING value + */ + ManifestOptions.OrderPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASCENDING"] = 1; + values[valuesById[2] = "DESCENDING"] = 2; + return values; + })(); + + return ManifestOptions; })(); - v1.VodStitchDetail = (function() { + v1.RenditionFilter = (function() { /** - * Properties of a VodStitchDetail. + * Properties of a RenditionFilter. * @memberof google.cloud.video.stitcher.v1 - * @interface IVodStitchDetail - * @property {string|null} [name] VodStitchDetail name - * @property {Array.|null} [adStitchDetails] VodStitchDetail adStitchDetails + * @interface IRenditionFilter + * @property {number|null} [bitrateBps] RenditionFilter bitrateBps + * @property {string|null} [codecs] RenditionFilter codecs */ /** - * Constructs a new VodStitchDetail. + * Constructs a new RenditionFilter. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VodStitchDetail. - * @implements IVodStitchDetail - * @constructor - * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set + * @classdesc Represents a RenditionFilter. + * @implements IRenditionFilter + * @constructor + * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set */ - function VodStitchDetail(properties) { - this.adStitchDetails = []; + function RenditionFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7611,92 +8250,89 @@ } /** - * VodStitchDetail name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * RenditionFilter bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @instance */ - VodStitchDetail.prototype.name = ""; + RenditionFilter.prototype.bitrateBps = 0; /** - * VodStitchDetail adStitchDetails. - * @member {Array.} adStitchDetails - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * RenditionFilter codecs. + * @member {string} codecs + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @instance */ - VodStitchDetail.prototype.adStitchDetails = $util.emptyArray; + RenditionFilter.prototype.codecs = ""; /** - * Creates a new VodStitchDetail instance using the specified properties. + * Creates a new RenditionFilter instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static - * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail instance + * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter instance */ - VodStitchDetail.create = function create(properties) { - return new VodStitchDetail(properties); + RenditionFilter.create = function create(properties) { + return new RenditionFilter(properties); }; /** - * Encodes the specified VodStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * Encodes the specified RenditionFilter message. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static - * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodStitchDetail.encode = function encode(message, writer) { + RenditionFilter.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.adStitchDetails != null && message.adStitchDetails.length) - for (var i = 0; i < message.adStitchDetails.length; ++i) - $root.google.cloud.video.stitcher.v1.AdStitchDetail.encode(message.adStitchDetails[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.bitrateBps); + if (message.codecs != null && Object.hasOwnProperty.call(message, "codecs")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.codecs); return writer; }; /** - * Encodes the specified VodStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * Encodes the specified RenditionFilter message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static - * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VodStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + RenditionFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VodStitchDetail message from the specified reader or buffer. + * Decodes a RenditionFilter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodStitchDetail.decode = function decode(reader, length) { + RenditionFilter.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.stitcher.v1.VodStitchDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.RenditionFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.bitrateBps = reader.int32(); break; } - case 3: { - if (!(message.adStitchDetails && message.adStitchDetails.length)) - message.adStitchDetails = []; - message.adStitchDetails.push($root.google.cloud.video.stitcher.v1.AdStitchDetail.decode(reader, reader.uint32())); + case 2: { + message.codecs = reader.string(); break; } default: @@ -7708,153 +8344,133 @@ }; /** - * Decodes a VodStitchDetail message from the specified reader or buffer, length delimited. + * Decodes a RenditionFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VodStitchDetail.decodeDelimited = function decodeDelimited(reader) { + RenditionFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VodStitchDetail message. + * Verifies a RenditionFilter message. * @function verify - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VodStitchDetail.verify = function verify(message) { + RenditionFilter.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.adStitchDetails != null && message.hasOwnProperty("adStitchDetails")) { - if (!Array.isArray(message.adStitchDetails)) - return "adStitchDetails: array expected"; - for (var i = 0; i < message.adStitchDetails.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.AdStitchDetail.verify(message.adStitchDetails[i]); - if (error) - return "adStitchDetails." + error; - } - } + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.codecs != null && message.hasOwnProperty("codecs")) + if (!$util.isString(message.codecs)) + return "codecs: string expected"; return null; }; /** - * Creates a VodStitchDetail message from a plain object. Also converts values to their respective internal types. + * Creates a RenditionFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter */ - VodStitchDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.VodStitchDetail) + RenditionFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.RenditionFilter) return object; - var message = new $root.google.cloud.video.stitcher.v1.VodStitchDetail(); - if (object.name != null) - message.name = String(object.name); - if (object.adStitchDetails) { - if (!Array.isArray(object.adStitchDetails)) - throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: array expected"); - message.adStitchDetails = []; - for (var i = 0; i < object.adStitchDetails.length; ++i) { - if (typeof object.adStitchDetails[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: object expected"); - message.adStitchDetails[i] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.fromObject(object.adStitchDetails[i]); - } - } + var message = new $root.google.cloud.video.stitcher.v1.RenditionFilter(); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.codecs != null) + message.codecs = String(object.codecs); return message; }; /** - * Creates a plain object from a VodStitchDetail message. Also converts values to other types if specified. + * Creates a plain object from a RenditionFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static - * @param {google.cloud.video.stitcher.v1.VodStitchDetail} message VodStitchDetail + * @param {google.cloud.video.stitcher.v1.RenditionFilter} message RenditionFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VodStitchDetail.toObject = function toObject(message, options) { + RenditionFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.adStitchDetails = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.adStitchDetails && message.adStitchDetails.length) { - object.adStitchDetails = []; - for (var j = 0; j < message.adStitchDetails.length; ++j) - object.adStitchDetails[j] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.toObject(message.adStitchDetails[j], options); + if (options.defaults) { + object.bitrateBps = 0; + object.codecs = ""; } + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.codecs != null && message.hasOwnProperty("codecs")) + object.codecs = message.codecs; return object; }; /** - * Converts this VodStitchDetail to JSON. + * Converts this RenditionFilter to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @instance * @returns {Object.} JSON object */ - VodStitchDetail.prototype.toJSON = function toJSON() { + RenditionFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VodStitchDetail + * Gets the default type url for RenditionFilter * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @memberof google.cloud.video.stitcher.v1.RenditionFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VodStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RenditionFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodStitchDetail"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.RenditionFilter"; }; - return VodStitchDetail; + return RenditionFilter; })(); - v1.AdStitchDetail = (function() { + v1.Slate = (function() { /** - * Properties of an AdStitchDetail. + * Properties of a Slate. * @memberof google.cloud.video.stitcher.v1 - * @interface IAdStitchDetail - * @property {string|null} [adBreakId] AdStitchDetail adBreakId - * @property {string|null} [adId] AdStitchDetail adId - * @property {google.protobuf.IDuration|null} [adTimeOffset] AdStitchDetail adTimeOffset - * @property {string|null} [skipReason] AdStitchDetail skipReason - * @property {Object.|null} [media] AdStitchDetail media + * @interface ISlate + * @property {string|null} [name] Slate name + * @property {string|null} [uri] Slate uri + * @property {google.cloud.video.stitcher.v1.Slate.IGamSlate|null} [gamSlate] Slate gamSlate */ /** - * Constructs a new AdStitchDetail. + * Constructs a new Slate. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents an AdStitchDetail. - * @implements IAdStitchDetail + * @classdesc Represents a Slate. + * @implements ISlate * @constructor - * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set */ - function AdStitchDetail(properties) { - this.media = {}; + function Slate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7862,153 +8478,103 @@ } /** - * AdStitchDetail adBreakId. - * @member {string} adBreakId - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail - * @instance - */ - AdStitchDetail.prototype.adBreakId = ""; - - /** - * AdStitchDetail adId. - * @member {string} adId - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail - * @instance - */ - AdStitchDetail.prototype.adId = ""; - - /** - * AdStitchDetail adTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} adTimeOffset - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * Slate name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.Slate * @instance */ - AdStitchDetail.prototype.adTimeOffset = null; + Slate.prototype.name = ""; /** - * AdStitchDetail skipReason. - * @member {string} skipReason - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * Slate uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.Slate * @instance */ - AdStitchDetail.prototype.skipReason = ""; + Slate.prototype.uri = ""; /** - * AdStitchDetail media. - * @member {Object.} media - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * Slate gamSlate. + * @member {google.cloud.video.stitcher.v1.Slate.IGamSlate|null|undefined} gamSlate + * @memberof google.cloud.video.stitcher.v1.Slate * @instance */ - AdStitchDetail.prototype.media = $util.emptyObject; + Slate.prototype.gamSlate = null; /** - * Creates a new AdStitchDetail instance using the specified properties. + * Creates a new Slate instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static - * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail instance + * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Slate} Slate instance */ - AdStitchDetail.create = function create(properties) { - return new AdStitchDetail(properties); + Slate.create = function create(properties) { + return new Slate(properties); }; /** - * Encodes the specified AdStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * Encodes the specified Slate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static - * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdStitchDetail.encode = function encode(message, writer) { + Slate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.adBreakId != null && Object.hasOwnProperty.call(message, "adBreakId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.adBreakId); - if (message.adId != null && Object.hasOwnProperty.call(message, "adId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.adId); - if (message.adTimeOffset != null && Object.hasOwnProperty.call(message, "adTimeOffset")) - $root.google.protobuf.Duration.encode(message.adTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.skipReason != null && Object.hasOwnProperty.call(message, "skipReason")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.skipReason); - if (message.media != null && Object.hasOwnProperty.call(message, "media")) - for (var keys = Object.keys(message.media), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.media[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.gamSlate != null && Object.hasOwnProperty.call(message, "gamSlate")) + $root.google.cloud.video.stitcher.v1.Slate.GamSlate.encode(message.gamSlate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AdStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * Encodes the specified Slate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static - * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + Slate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdStitchDetail message from the specified reader or buffer. + * Decodes a Slate message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @returns {google.cloud.video.stitcher.v1.Slate} Slate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdStitchDetail.decode = function decode(reader, length) { + Slate.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.stitcher.v1.AdStitchDetail(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Slate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.adBreakId = reader.string(); + message.name = reader.string(); break; } case 2: { - message.adId = reader.string(); + message.uri = reader.string(); break; } case 3: { - message.adTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.skipReason = reader.string(); - break; - } - case 5: { - if (message.media === $util.emptyObject) - message.media = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.media[key] = value; + message.gamSlate = $root.google.cloud.video.stitcher.v1.Slate.GamSlate.decode(reader, reader.uint32()); break; } default: @@ -8020,1540 +8586,1910 @@ }; /** - * Decodes an AdStitchDetail message from the specified reader or buffer, length delimited. + * Decodes a Slate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @returns {google.cloud.video.stitcher.v1.Slate} Slate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdStitchDetail.decodeDelimited = function decodeDelimited(reader) { + Slate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdStitchDetail message. + * Verifies a Slate message. * @function verify - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdStitchDetail.verify = function verify(message) { + Slate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) - if (!$util.isString(message.adBreakId)) - return "adBreakId: string expected"; - if (message.adId != null && message.hasOwnProperty("adId")) - if (!$util.isString(message.adId)) - return "adId: string expected"; - if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.adTimeOffset); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.gamSlate != null && message.hasOwnProperty("gamSlate")) { + var error = $root.google.cloud.video.stitcher.v1.Slate.GamSlate.verify(message.gamSlate); if (error) - return "adTimeOffset." + error; - } - if (message.skipReason != null && message.hasOwnProperty("skipReason")) - if (!$util.isString(message.skipReason)) - return "skipReason: string expected"; - if (message.media != null && message.hasOwnProperty("media")) { - if (!$util.isObject(message.media)) - return "media: object expected"; - var key = Object.keys(message.media); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.media[key[i]]); - if (error) - return "media." + error; - } + return "gamSlate." + error; } return null; }; /** - * Creates an AdStitchDetail message from a plain object. Also converts values to their respective internal types. + * Creates a Slate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @returns {google.cloud.video.stitcher.v1.Slate} Slate */ - AdStitchDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.AdStitchDetail) + Slate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Slate) return object; - var message = new $root.google.cloud.video.stitcher.v1.AdStitchDetail(); - if (object.adBreakId != null) - message.adBreakId = String(object.adBreakId); - if (object.adId != null) - message.adId = String(object.adId); - if (object.adTimeOffset != null) { - if (typeof object.adTimeOffset !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.adTimeOffset: object expected"); - message.adTimeOffset = $root.google.protobuf.Duration.fromObject(object.adTimeOffset); - } - if (object.skipReason != null) - message.skipReason = String(object.skipReason); - if (object.media) { - if (typeof object.media !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); - message.media = {}; - for (var keys = Object.keys(object.media), i = 0; i < keys.length; ++i) { - if (typeof object.media[keys[i]] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); - message.media[keys[i]] = $root.google.protobuf.Value.fromObject(object.media[keys[i]]); - } + var message = new $root.google.cloud.video.stitcher.v1.Slate(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.gamSlate != null) { + if (typeof object.gamSlate !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Slate.gamSlate: object expected"); + message.gamSlate = $root.google.cloud.video.stitcher.v1.Slate.GamSlate.fromObject(object.gamSlate); } return message; }; /** - * Creates a plain object from an AdStitchDetail message. Also converts values to other types if specified. + * Creates a plain object from a Slate message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static - * @param {google.cloud.video.stitcher.v1.AdStitchDetail} message AdStitchDetail + * @param {google.cloud.video.stitcher.v1.Slate} message Slate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdStitchDetail.toObject = function toObject(message, options) { + Slate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.media = {}; if (options.defaults) { - object.adBreakId = ""; - object.adId = ""; - object.adTimeOffset = null; - object.skipReason = ""; - } - if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) - object.adBreakId = message.adBreakId; - if (message.adId != null && message.hasOwnProperty("adId")) - object.adId = message.adId; - if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) - object.adTimeOffset = $root.google.protobuf.Duration.toObject(message.adTimeOffset, options); - if (message.skipReason != null && message.hasOwnProperty("skipReason")) - object.skipReason = message.skipReason; - var keys2; - if (message.media && (keys2 = Object.keys(message.media)).length) { - object.media = {}; - for (var j = 0; j < keys2.length; ++j) - object.media[keys2[j]] = $root.google.protobuf.Value.toObject(message.media[keys2[j]], options); + object.name = ""; + object.uri = ""; + object.gamSlate = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.gamSlate != null && message.hasOwnProperty("gamSlate")) + object.gamSlate = $root.google.cloud.video.stitcher.v1.Slate.GamSlate.toObject(message.gamSlate, options); return object; }; /** - * Converts this AdStitchDetail to JSON. + * Converts this Slate to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @instance * @returns {Object.} JSON object */ - AdStitchDetail.prototype.toJSON = function toJSON() { + Slate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdStitchDetail + * Gets the default type url for Slate * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @memberof google.cloud.video.stitcher.v1.Slate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Slate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdStitchDetail"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Slate"; }; - return AdStitchDetail; + Slate.GamSlate = (function() { + + /** + * Properties of a GamSlate. + * @memberof google.cloud.video.stitcher.v1.Slate + * @interface IGamSlate + * @property {string|null} [networkCode] GamSlate networkCode + * @property {number|Long|null} [gamSlateId] GamSlate gamSlateId + */ + + /** + * Constructs a new GamSlate. + * @memberof google.cloud.video.stitcher.v1.Slate + * @classdesc Represents a GamSlate. + * @implements IGamSlate + * @constructor + * @param {google.cloud.video.stitcher.v1.Slate.IGamSlate=} [properties] Properties to set + */ + function GamSlate(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]]; + } + + /** + * GamSlate networkCode. + * @member {string} networkCode + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @instance + */ + GamSlate.prototype.networkCode = ""; + + /** + * GamSlate gamSlateId. + * @member {number|Long} gamSlateId + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @instance + */ + GamSlate.prototype.gamSlateId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GamSlate instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {google.cloud.video.stitcher.v1.Slate.IGamSlate=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Slate.GamSlate} GamSlate instance + */ + GamSlate.create = function create(properties) { + return new GamSlate(properties); + }; + + /** + * Encodes the specified GamSlate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.GamSlate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {google.cloud.video.stitcher.v1.Slate.IGamSlate} message GamSlate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSlate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkCode != null && Object.hasOwnProperty.call(message, "networkCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkCode); + if (message.gamSlateId != null && Object.hasOwnProperty.call(message, "gamSlateId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.gamSlateId); + return writer; + }; + + /** + * Encodes the specified GamSlate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.GamSlate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {google.cloud.video.stitcher.v1.Slate.IGamSlate} message GamSlate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GamSlate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GamSlate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.Slate.GamSlate} GamSlate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSlate.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.stitcher.v1.Slate.GamSlate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkCode = reader.string(); + break; + } + case 2: { + message.gamSlateId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GamSlate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.Slate.GamSlate} GamSlate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GamSlate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GamSlate message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GamSlate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + if (!$util.isString(message.networkCode)) + return "networkCode: string expected"; + if (message.gamSlateId != null && message.hasOwnProperty("gamSlateId")) + if (!$util.isInteger(message.gamSlateId) && !(message.gamSlateId && $util.isInteger(message.gamSlateId.low) && $util.isInteger(message.gamSlateId.high))) + return "gamSlateId: integer|Long expected"; + return null; + }; + + /** + * Creates a GamSlate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.Slate.GamSlate} GamSlate + */ + GamSlate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Slate.GamSlate) + return object; + var message = new $root.google.cloud.video.stitcher.v1.Slate.GamSlate(); + if (object.networkCode != null) + message.networkCode = String(object.networkCode); + if (object.gamSlateId != null) + if ($util.Long) + (message.gamSlateId = $util.Long.fromValue(object.gamSlateId)).unsigned = false; + else if (typeof object.gamSlateId === "string") + message.gamSlateId = parseInt(object.gamSlateId, 10); + else if (typeof object.gamSlateId === "number") + message.gamSlateId = object.gamSlateId; + else if (typeof object.gamSlateId === "object") + message.gamSlateId = new $util.LongBits(object.gamSlateId.low >>> 0, object.gamSlateId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GamSlate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {google.cloud.video.stitcher.v1.Slate.GamSlate} message GamSlate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GamSlate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gamSlateId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gamSlateId = options.longs === String ? "0" : 0; + } + if (message.networkCode != null && message.hasOwnProperty("networkCode")) + object.networkCode = message.networkCode; + if (message.gamSlateId != null && message.hasOwnProperty("gamSlateId")) + if (typeof message.gamSlateId === "number") + object.gamSlateId = options.longs === String ? String(message.gamSlateId) : message.gamSlateId; + else + object.gamSlateId = options.longs === String ? $util.Long.prototype.toString.call(message.gamSlateId) : options.longs === Number ? new $util.LongBits(message.gamSlateId.low >>> 0, message.gamSlateId.high >>> 0).toNumber() : message.gamSlateId; + return object; + }; + + /** + * Converts this GamSlate to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @instance + * @returns {Object.} JSON object + */ + GamSlate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GamSlate + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.Slate.GamSlate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GamSlate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Slate.GamSlate"; + }; + + return GamSlate; + })(); + + return Slate; })(); - v1.VideoStitcherService = (function() { + v1.VodStitchDetail = (function() { /** - * Constructs a new VideoStitcherService service. + * Properties of a VodStitchDetail. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a VideoStitcherService - * @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 + * @interface IVodStitchDetail + * @property {string|null} [name] VodStitchDetail name + * @property {Array.|null} [adStitchDetails] VodStitchDetail adStitchDetails */ - function VideoStitcherService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (VideoStitcherService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VideoStitcherService; /** - * Creates new VideoStitcherService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @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 {VideoStitcherService} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new VodStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodStitchDetail. + * @implements IVodStitchDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set */ - VideoStitcherService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function VodStitchDetail(properties) { + this.adStitchDetails = []; + 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.stitcher.v1.VideoStitcherService|createCdnKey}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef CreateCdnKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey - */ - - /** - * Calls CreateCdnKey. - * @function createCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * VodStitchDetail name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.createCdnKey = function createCdnKey(request, callback) { - return this.rpcCall(createCdnKey, $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); - }, "name", { value: "CreateCdnKey" }); + VodStitchDetail.prototype.name = ""; /** - * Calls CreateCdnKey. - * @function createCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * VodStitchDetail adStitchDetails. + * @member {Array.} adStitchDetails + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + VodStitchDetail.prototype.adStitchDetails = $util.emptyArray; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listCdnKeys}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef ListCdnKeysCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} [response] ListCdnKeysResponse + * Creates a new VodStitchDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail instance */ + VodStitchDetail.create = function create(properties) { + return new VodStitchDetail(properties); + }; /** - * Calls ListCdnKeys. - * @function listCdnKeys - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeysCallback} callback Node-style callback called with the error, if any, and ListCdnKeysResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified VodStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(VideoStitcherService.prototype.listCdnKeys = function listCdnKeys(request, callback) { - return this.rpcCall(listCdnKeys, $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest, $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse, request, callback); - }, "name", { value: "ListCdnKeys" }); + VodStitchDetail.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.adStitchDetails != null && message.adStitchDetails.length) + for (var i = 0; i < message.adStitchDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.AdStitchDetail.encode(message.adStitchDetails[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls ListCdnKeys. - * @function listCdnKeys - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified VodStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + VodStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getCdnKey}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetCdnKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey + * Decodes a VodStitchDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + VodStitchDetail.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.stitcher.v1.VodStitchDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.adStitchDetails && message.adStitchDetails.length)) + message.adStitchDetails = []; + message.adStitchDetails.push($root.google.cloud.video.stitcher.v1.AdStitchDetail.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetCdnKey. - * @function getCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey - * @returns {undefined} - * @variation 1 + * Decodes a VodStitchDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(VideoStitcherService.prototype.getCdnKey = function getCdnKey(request, callback) { - return this.rpcCall(getCdnKey, $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); - }, "name", { value: "GetCdnKey" }); + VodStitchDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetCdnKey. - * @function getCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a VodStitchDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + VodStitchDetail.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.adStitchDetails != null && message.hasOwnProperty("adStitchDetails")) { + if (!Array.isArray(message.adStitchDetails)) + return "adStitchDetails: array expected"; + for (var i = 0; i < message.adStitchDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.AdStitchDetail.verify(message.adStitchDetails[i]); + if (error) + return "adStitchDetails." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteCdnKey}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef DeleteCdnKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a VodStitchDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail */ + VodStitchDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodStitchDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodStitchDetail(); + if (object.name != null) + message.name = String(object.name); + if (object.adStitchDetails) { + if (!Array.isArray(object.adStitchDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: array expected"); + message.adStitchDetails = []; + for (var i = 0; i < object.adStitchDetails.length; ++i) { + if (typeof object.adStitchDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: object expected"); + message.adStitchDetails[i] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.fromObject(object.adStitchDetails[i]); + } + } + return message; + }; /** - * Calls DeleteCdnKey. - * @function deleteCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKeyCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a VodStitchDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.VodStitchDetail} message VodStitchDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(VideoStitcherService.prototype.deleteCdnKey = function deleteCdnKey(request, callback) { - return this.rpcCall(deleteCdnKey, $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteCdnKey" }); + VodStitchDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adStitchDetails = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adStitchDetails && message.adStitchDetails.length) { + object.adStitchDetails = []; + for (var j = 0; j < message.adStitchDetails.length; ++j) + object.adStitchDetails[j] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.toObject(message.adStitchDetails[j], options); + } + return object; + }; /** - * Calls DeleteCdnKey. - * @function deleteCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * Converts this VodStitchDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + VodStitchDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateCdnKey}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef UpdateCdnKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey + * Gets the default type url for VodStitchDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + VodStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodStitchDetail"; + }; - /** - * Calls UpdateCdnKey. - * @function updateCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VideoStitcherService.prototype.updateCdnKey = function updateCdnKey(request, callback) { - return this.rpcCall(updateCdnKey, $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); - }, "name", { value: "UpdateCdnKey" }); + return VodStitchDetail; + })(); - /** - * Calls UpdateCdnKey. - * @function updateCdnKey - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1.AdStitchDetail = (function() { /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createVodSession}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef CreateVodSessionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession + * Properties of an AdStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @interface IAdStitchDetail + * @property {string|null} [adBreakId] AdStitchDetail adBreakId + * @property {string|null} [adId] AdStitchDetail adId + * @property {google.protobuf.IDuration|null} [adTimeOffset] AdStitchDetail adTimeOffset + * @property {string|null} [skipReason] AdStitchDetail skipReason + * @property {Object.|null} [media] AdStitchDetail media */ /** - * Calls CreateVodSession. - * @function createVodSession - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession - * @returns {undefined} - * @variation 1 + * Constructs a new AdStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an AdStitchDetail. + * @implements IAdStitchDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set */ - Object.defineProperty(VideoStitcherService.prototype.createVodSession = function createVodSession(request, callback) { - return this.rpcCall(createVodSession, $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); - }, "name", { value: "CreateVodSession" }); + function AdStitchDetail(properties) { + this.media = {}; + 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 CreateVodSession. - * @function createVodSession - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * AdStitchDetail adBreakId. + * @member {string} adBreakId + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodSession}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetVodSessionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession */ + AdStitchDetail.prototype.adBreakId = ""; /** - * Calls GetVodSession. - * @function getVodSession - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * AdStitchDetail adId. + * @member {string} adId + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.getVodSession = function getVodSession(request, callback) { - return this.rpcCall(getVodSession, $root.google.cloud.video.stitcher.v1.GetVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); - }, "name", { value: "GetVodSession" }); + AdStitchDetail.prototype.adId = ""; /** - * Calls GetVodSession. - * @function getVodSession - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * AdStitchDetail adTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} adTimeOffset + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodStitchDetails}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef ListVodStitchDetailsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} [response] ListVodStitchDetailsResponse */ + AdStitchDetail.prototype.adTimeOffset = null; /** - * Calls ListVodStitchDetails. - * @function listVodStitchDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * AdStitchDetail skipReason. + * @member {string} skipReason + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetailsCallback} callback Node-style callback called with the error, if any, and ListVodStitchDetailsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.listVodStitchDetails = function listVodStitchDetails(request, callback) { - return this.rpcCall(listVodStitchDetails, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse, request, callback); - }, "name", { value: "ListVodStitchDetails" }); + AdStitchDetail.prototype.skipReason = ""; /** - * Calls ListVodStitchDetails. - * @function listVodStitchDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * AdStitchDetail media. + * @member {Object.} media + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodStitchDetail}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetVodStitchDetailCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.VodStitchDetail} [response] VodStitchDetail */ + AdStitchDetail.prototype.media = $util.emptyObject; /** - * Calls GetVodStitchDetail. - * @function getVodStitchDetail - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetailCallback} callback Node-style callback called with the error, if any, and VodStitchDetail - * @returns {undefined} - * @variation 1 + * Creates a new AdStitchDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail instance */ - Object.defineProperty(VideoStitcherService.prototype.getVodStitchDetail = function getVodStitchDetail(request, callback) { - return this.rpcCall(getVodStitchDetail, $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest, $root.google.cloud.video.stitcher.v1.VodStitchDetail, request, callback); - }, "name", { value: "GetVodStitchDetail" }); + AdStitchDetail.create = function create(properties) { + return new AdStitchDetail(properties); + }; /** - * Calls GetVodStitchDetail. - * @function getVodStitchDetail - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AdStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AdStitchDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adBreakId != null && Object.hasOwnProperty.call(message, "adBreakId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.adBreakId); + if (message.adId != null && Object.hasOwnProperty.call(message, "adId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.adId); + if (message.adTimeOffset != null && Object.hasOwnProperty.call(message, "adTimeOffset")) + $root.google.protobuf.Duration.encode(message.adTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.skipReason != null && Object.hasOwnProperty.call(message, "skipReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.skipReason); + if (message.media != null && Object.hasOwnProperty.call(message, "media")) + for (var keys = Object.keys(message.media), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.media[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodAdTagDetails}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef ListVodAdTagDetailsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} [response] ListVodAdTagDetailsResponse + * Encodes the specified AdStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AdStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListVodAdTagDetails. - * @function listVodAdTagDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListVodAdTagDetailsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VideoStitcherService.prototype.listVodAdTagDetails = function listVodAdTagDetails(request, callback) { - return this.rpcCall(listVodAdTagDetails, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse, request, callback); - }, "name", { value: "ListVodAdTagDetails" }); - - /** - * Calls ListVodAdTagDetails. - * @function listVodAdTagDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AdStitchDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AdStitchDetail.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.stitcher.v1.AdStitchDetail(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.adBreakId = reader.string(); + break; + } + case 2: { + message.adId = reader.string(); + break; + } + case 3: { + message.adTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.skipReason = reader.string(); + break; + } + case 5: { + if (message.media === $util.emptyObject) + message.media = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.media[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodAdTagDetail}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetVodAdTagDetailCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.VodAdTagDetail} [response] VodAdTagDetail + * Decodes an AdStitchDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AdStitchDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetVodAdTagDetail. - * @function getVodAdTagDetail - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetailCallback} callback Node-style callback called with the error, if any, and VodAdTagDetail - * @returns {undefined} - * @variation 1 + * Verifies an AdStitchDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(VideoStitcherService.prototype.getVodAdTagDetail = function getVodAdTagDetail(request, callback) { - return this.rpcCall(getVodAdTagDetail, $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.VodAdTagDetail, request, callback); - }, "name", { value: "GetVodAdTagDetail" }); + AdStitchDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) + if (!$util.isString(message.adBreakId)) + return "adBreakId: string expected"; + if (message.adId != null && message.hasOwnProperty("adId")) + if (!$util.isString(message.adId)) + return "adId: string expected"; + if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.adTimeOffset); + if (error) + return "adTimeOffset." + error; + } + if (message.skipReason != null && message.hasOwnProperty("skipReason")) + if (!$util.isString(message.skipReason)) + return "skipReason: string expected"; + if (message.media != null && message.hasOwnProperty("media")) { + if (!$util.isObject(message.media)) + return "media: object expected"; + var key = Object.keys(message.media); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.media[key[i]]); + if (error) + return "media." + error; + } + } + return null; + }; /** - * Calls GetVodAdTagDetail. - * @function getVodAdTagDetail - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AdStitchDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail */ + AdStitchDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.AdStitchDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.AdStitchDetail(); + if (object.adBreakId != null) + message.adBreakId = String(object.adBreakId); + if (object.adId != null) + message.adId = String(object.adId); + if (object.adTimeOffset != null) { + if (typeof object.adTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.adTimeOffset: object expected"); + message.adTimeOffset = $root.google.protobuf.Duration.fromObject(object.adTimeOffset); + } + if (object.skipReason != null) + message.skipReason = String(object.skipReason); + if (object.media) { + if (typeof object.media !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); + message.media = {}; + for (var keys = Object.keys(object.media), i = 0; i < keys.length; ++i) { + if (typeof object.media[keys[i]] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); + message.media[keys[i]] = $root.google.protobuf.Value.fromObject(object.media[keys[i]]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveAdTagDetails}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef ListLiveAdTagDetailsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} [response] ListLiveAdTagDetailsResponse + * Creates a plain object from an AdStitchDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.AdStitchDetail} message AdStitchDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AdStitchDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.media = {}; + if (options.defaults) { + object.adBreakId = ""; + object.adId = ""; + object.adTimeOffset = null; + object.skipReason = ""; + } + if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) + object.adBreakId = message.adBreakId; + if (message.adId != null && message.hasOwnProperty("adId")) + object.adId = message.adId; + if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) + object.adTimeOffset = $root.google.protobuf.Duration.toObject(message.adTimeOffset, options); + if (message.skipReason != null && message.hasOwnProperty("skipReason")) + object.skipReason = message.skipReason; + var keys2; + if (message.media && (keys2 = Object.keys(message.media)).length) { + object.media = {}; + for (var j = 0; j < keys2.length; ++j) + object.media[keys2[j]] = $root.google.protobuf.Value.toObject(message.media[keys2[j]], options); + } + return object; + }; /** - * Calls ListLiveAdTagDetails. - * @function listLiveAdTagDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * Converts this AdStitchDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail * @instance - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListLiveAdTagDetailsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(VideoStitcherService.prototype.listLiveAdTagDetails = function listLiveAdTagDetails(request, callback) { - return this.rpcCall(listLiveAdTagDetails, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse, request, callback); - }, "name", { value: "ListLiveAdTagDetails" }); + AdStitchDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListLiveAdTagDetails. - * @function listLiveAdTagDetails - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AdStitchDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AdStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdStitchDetail"; + }; - /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveAdTagDetail}. - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetLiveAdTagDetailCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.LiveAdTagDetail} [response] LiveAdTagDetail - */ + return AdStitchDetail; + })(); + + v1.VideoStitcherService = (function() { /** - * Calls GetLiveAdTagDetail. - * @function getLiveAdTagDetail - * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @instance - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetailCallback} callback Node-style callback called with the error, if any, and LiveAdTagDetail + * Constructs a new VideoStitcherService service. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VideoStitcherService + * @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 VideoStitcherService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (VideoStitcherService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VideoStitcherService; + + /** + * Creates new VideoStitcherService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @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 {VideoStitcherService} RPC service. Useful where requests and/or responses are streamed. + */ + VideoStitcherService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createCdnKey}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateCdnKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCdnKey. + * @function createCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKeyCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.getLiveAdTagDetail = function getLiveAdTagDetail(request, callback) { - return this.rpcCall(getLiveAdTagDetail, $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.LiveAdTagDetail, request, callback); - }, "name", { value: "GetLiveAdTagDetail" }); + Object.defineProperty(VideoStitcherService.prototype.createCdnKey = function createCdnKey(request, callback) { + return this.rpcCall(createCdnKey, $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCdnKey" }); /** - * Calls GetLiveAdTagDetail. - * @function getLiveAdTagDetail + * Calls CreateCdnKey. + * @function createCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createSlate}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listCdnKeys}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef CreateSlateCallback + * @typedef ListCdnKeysCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} [response] ListCdnKeysResponse */ /** - * Calls CreateSlate. - * @function createSlate + * Calls ListCdnKeys. + * @function listCdnKeys * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeysCallback} callback Node-style callback called with the error, if any, and ListCdnKeysResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.createSlate = function createSlate(request, callback) { - return this.rpcCall(createSlate, $root.google.cloud.video.stitcher.v1.CreateSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); - }, "name", { value: "CreateSlate" }); + Object.defineProperty(VideoStitcherService.prototype.listCdnKeys = function listCdnKeys(request, callback) { + return this.rpcCall(listCdnKeys, $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest, $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse, request, callback); + }, "name", { value: "ListCdnKeys" }); /** - * Calls CreateSlate. - * @function createSlate + * Calls ListCdnKeys. + * @function listCdnKeys * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listSlates}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getCdnKey}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef ListSlatesCallback + * @typedef GetCdnKeyCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} [response] ListSlatesResponse + * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey */ /** - * Calls ListSlates. - * @function listSlates + * Calls GetCdnKey. + * @function getCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListSlatesCallback} callback Node-style callback called with the error, if any, and ListSlatesResponse + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.listSlates = function listSlates(request, callback) { - return this.rpcCall(listSlates, $root.google.cloud.video.stitcher.v1.ListSlatesRequest, $root.google.cloud.video.stitcher.v1.ListSlatesResponse, request, callback); - }, "name", { value: "ListSlates" }); + Object.defineProperty(VideoStitcherService.prototype.getCdnKey = function getCdnKey(request, callback) { + return this.rpcCall(getCdnKey, $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); + }, "name", { value: "GetCdnKey" }); /** - * Calls ListSlates. - * @function listSlates + * Calls GetCdnKey. + * @function getCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getSlate}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteCdnKey}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetSlateCallback + * @typedef DeleteCdnKeyCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls GetSlate. - * @function getSlate + * Calls DeleteCdnKey. + * @function deleteCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKeyCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.getSlate = function getSlate(request, callback) { - return this.rpcCall(getSlate, $root.google.cloud.video.stitcher.v1.GetSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); - }, "name", { value: "GetSlate" }); + Object.defineProperty(VideoStitcherService.prototype.deleteCdnKey = function deleteCdnKey(request, callback) { + return this.rpcCall(deleteCdnKey, $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteCdnKey" }); /** - * Calls GetSlate. - * @function getSlate + * Calls DeleteCdnKey. + * @function deleteCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateSlate}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateCdnKey}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef UpdateSlateCallback + * @typedef UpdateCdnKeyCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls UpdateSlate. - * @function updateSlate + * Calls UpdateCdnKey. + * @function updateCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKeyCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.updateSlate = function updateSlate(request, callback) { - return this.rpcCall(updateSlate, $root.google.cloud.video.stitcher.v1.UpdateSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); - }, "name", { value: "UpdateSlate" }); + Object.defineProperty(VideoStitcherService.prototype.updateCdnKey = function updateCdnKey(request, callback) { + return this.rpcCall(updateCdnKey, $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCdnKey" }); /** - * Calls UpdateSlate. - * @function updateSlate + * Calls UpdateCdnKey. + * @function updateCdnKey * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteSlate}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createVodSession}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef DeleteSlateCallback + * @typedef CreateVodSessionCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession */ /** - * Calls DeleteSlate. - * @function deleteSlate + * Calls CreateVodSession. + * @function createVodSession * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlateCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.deleteSlate = function deleteSlate(request, callback) { - return this.rpcCall(deleteSlate, $root.google.cloud.video.stitcher.v1.DeleteSlateRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSlate" }); + Object.defineProperty(VideoStitcherService.prototype.createVodSession = function createVodSession(request, callback) { + return this.rpcCall(createVodSession, $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); + }, "name", { value: "CreateVodSession" }); /** - * Calls DeleteSlate. - * @function deleteSlate + * Calls CreateVodSession. + * @function createVodSession * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveSession}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodSession}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef CreateLiveSessionCallback + * @typedef GetVodSessionCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession + * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession */ /** - * Calls CreateLiveSession. - * @function createLiveSession + * Calls GetVodSession. + * @function getVodSession * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.createLiveSession = function createLiveSession(request, callback) { - return this.rpcCall(createLiveSession, $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); - }, "name", { value: "CreateLiveSession" }); + Object.defineProperty(VideoStitcherService.prototype.getVodSession = function getVodSession(request, callback) { + return this.rpcCall(getVodSession, $root.google.cloud.video.stitcher.v1.GetVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); + }, "name", { value: "GetVodSession" }); /** - * Calls CreateLiveSession. - * @function createLiveSession + * Calls GetVodSession. + * @function getVodSession * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveSession}. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodStitchDetails}. * @memberof google.cloud.video.stitcher.v1.VideoStitcherService - * @typedef GetLiveSessionCallback + * @typedef ListVodStitchDetailsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} [response] ListVodStitchDetailsResponse */ /** - * Calls GetLiveSession. - * @function getLiveSession + * Calls ListVodStitchDetails. + * @function listVodStitchDetails * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object - * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetailsCallback} callback Node-style callback called with the error, if any, and ListVodStitchDetailsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(VideoStitcherService.prototype.getLiveSession = function getLiveSession(request, callback) { - return this.rpcCall(getLiveSession, $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); - }, "name", { value: "GetLiveSession" }); + Object.defineProperty(VideoStitcherService.prototype.listVodStitchDetails = function listVodStitchDetails(request, callback) { + return this.rpcCall(listVodStitchDetails, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse, request, callback); + }, "name", { value: "ListVodStitchDetails" }); /** - * Calls GetLiveSession. - * @function getLiveSession + * Calls ListVodStitchDetails. + * @function listVodStitchDetails * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return VideoStitcherService; - })(); - - v1.CreateCdnKeyRequest = (function() { - /** - * Properties of a CreateCdnKeyRequest. - * @memberof google.cloud.video.stitcher.v1 - * @interface ICreateCdnKeyRequest - * @property {string|null} [parent] CreateCdnKeyRequest parent - * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] CreateCdnKeyRequest cdnKey - * @property {string|null} [cdnKeyId] CreateCdnKeyRequest cdnKeyId + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodStitchDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetVodStitchDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodStitchDetail} [response] VodStitchDetail */ /** - * Constructs a new CreateCdnKeyRequest. - * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a CreateCdnKeyRequest. - * @implements ICreateCdnKeyRequest - * @constructor - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set + * Calls GetVodStitchDetail. + * @function getVodStitchDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetailCallback} callback Node-style callback called with the error, if any, and VodStitchDetail + * @returns {undefined} + * @variation 1 */ - function CreateCdnKeyRequest(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]]; - } + Object.defineProperty(VideoStitcherService.prototype.getVodStitchDetail = function getVodStitchDetail(request, callback) { + return this.rpcCall(getVodStitchDetail, $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest, $root.google.cloud.video.stitcher.v1.VodStitchDetail, request, callback); + }, "name", { value: "GetVodStitchDetail" }); /** - * CreateCdnKeyRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * Calls GetVodStitchDetail. + * @function getVodStitchDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateCdnKeyRequest.prototype.parent = ""; /** - * CreateCdnKeyRequest cdnKey. - * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @instance + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodAdTagDetails}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListVodAdTagDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} [response] ListVodAdTagDetailsResponse */ - CreateCdnKeyRequest.prototype.cdnKey = null; /** - * CreateCdnKeyRequest cdnKeyId. - * @member {string} cdnKeyId - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * Calls ListVodAdTagDetails. + * @function listVodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListVodAdTagDetailsResponse + * @returns {undefined} + * @variation 1 */ - CreateCdnKeyRequest.prototype.cdnKeyId = ""; + Object.defineProperty(VideoStitcherService.prototype.listVodAdTagDetails = function listVodAdTagDetails(request, callback) { + return this.rpcCall(listVodAdTagDetails, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse, request, callback); + }, "name", { value: "ListVodAdTagDetails" }); /** - * Creates a new CreateCdnKeyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest instance + * Calls ListVodAdTagDetails. + * @function listVodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateCdnKeyRequest.create = function create(properties) { - return new CreateCdnKeyRequest(properties); - }; /** - * Encodes the specified CreateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodAdTagDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetVodAdTagDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodAdTagDetail} [response] VodAdTagDetail */ - CreateCdnKeyRequest.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.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) - $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cdnKeyId != null && Object.hasOwnProperty.call(message, "cdnKeyId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cdnKeyId); - return writer; - }; /** - * Encodes the specified CreateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetVodAdTagDetail. + * @function getVodAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetailCallback} callback Node-style callback called with the error, if any, and VodAdTagDetail + * @returns {undefined} + * @variation 1 */ - CreateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(VideoStitcherService.prototype.getVodAdTagDetail = function getVodAdTagDetail(request, callback) { + return this.rpcCall(getVodAdTagDetail, $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.VodAdTagDetail, request, callback); + }, "name", { value: "GetVodAdTagDetail" }); /** - * Decodes a CreateCdnKeyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetVodAdTagDetail. + * @function getVodAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateCdnKeyRequest.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.stitcher.v1.CreateCdnKeyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cdnKeyId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CreateCdnKeyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveAdTagDetails}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListLiveAdTagDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} [response] ListLiveAdTagDetailsResponse */ - CreateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a CreateCdnKeyRequest message. - * @function verify - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListLiveAdTagDetails. + * @function listLiveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListLiveAdTagDetailsResponse + * @returns {undefined} + * @variation 1 */ - CreateCdnKeyRequest.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.cdnKey != null && message.hasOwnProperty("cdnKey")) { - var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); - if (error) - return "cdnKey." + error; - } - if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) - if (!$util.isString(message.cdnKeyId)) - return "cdnKeyId: string expected"; - return null; - }; + Object.defineProperty(VideoStitcherService.prototype.listLiveAdTagDetails = function listLiveAdTagDetails(request, callback) { + return this.rpcCall(listLiveAdTagDetails, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse, request, callback); + }, "name", { value: "ListLiveAdTagDetails" }); /** - * Creates a CreateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest + * Calls ListLiveAdTagDetails. + * @function listLiveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateCdnKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest) - return object; - var message = new $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.cdnKey != null) { - if (typeof object.cdnKey !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.CreateCdnKeyRequest.cdnKey: object expected"); - message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); - } - if (object.cdnKeyId != null) - message.cdnKeyId = String(object.cdnKeyId); - return message; - }; /** - * Creates a plain object from a CreateCdnKeyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} message CreateCdnKeyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveAdTagDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetLiveAdTagDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveAdTagDetail} [response] LiveAdTagDetail */ - CreateCdnKeyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.cdnKey = null; - object.cdnKeyId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) - object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); - if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) - object.cdnKeyId = message.cdnKeyId; - return object; - }; /** - * Converts this CreateCdnKeyRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * Calls GetLiveAdTagDetail. + * @function getLiveAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetailCallback} callback Node-style callback called with the error, if any, and LiveAdTagDetail + * @returns {undefined} + * @variation 1 */ - CreateCdnKeyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(VideoStitcherService.prototype.getLiveAdTagDetail = function getLiveAdTagDetail(request, callback) { + return this.rpcCall(getLiveAdTagDetail, $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.LiveAdTagDetail, request, callback); + }, "name", { value: "GetLiveAdTagDetail" }); /** - * Gets the default type url for CreateCdnKeyRequest - * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls GetLiveAdTagDetail. + * @function getLiveAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateCdnKeyRequest"; - }; - return CreateCdnKeyRequest; - })(); + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.ListCdnKeysRequest = (function() { + /** + * Calls CreateSlate. + * @function createSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.createSlate = function createSlate(request, callback) { + return this.rpcCall(createSlate, $root.google.cloud.video.stitcher.v1.CreateSlateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateSlate" }); /** - * Properties of a ListCdnKeysRequest. - * @memberof google.cloud.video.stitcher.v1 - * @interface IListCdnKeysRequest - * @property {string|null} [parent] ListCdnKeysRequest parent - * @property {number|null} [pageSize] ListCdnKeysRequest pageSize - * @property {string|null} [pageToken] ListCdnKeysRequest pageToken - * @property {string|null} [filter] ListCdnKeysRequest filter - * @property {string|null} [orderBy] ListCdnKeysRequest orderBy + * Calls CreateSlate. + * @function createSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListCdnKeysRequest. - * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListCdnKeysRequest. - * @implements IListCdnKeysRequest - * @constructor - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listSlates}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListSlatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} [response] ListSlatesResponse */ - function ListCdnKeysRequest(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]]; - } /** - * ListCdnKeysRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Calls ListSlates. + * @function listSlates + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListSlatesCallback} callback Node-style callback called with the error, if any, and ListSlatesResponse + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.prototype.parent = ""; + Object.defineProperty(VideoStitcherService.prototype.listSlates = function listSlates(request, callback) { + return this.rpcCall(listSlates, $root.google.cloud.video.stitcher.v1.ListSlatesRequest, $root.google.cloud.video.stitcher.v1.ListSlatesResponse, request, callback); + }, "name", { value: "ListSlates" }); /** - * ListCdnKeysRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Calls ListSlates. + * @function listSlates + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.prototype.pageSize = 0; /** - * ListCdnKeysRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + */ + + /** + * Calls GetSlate. + * @function getSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.prototype.pageToken = ""; + Object.defineProperty(VideoStitcherService.prototype.getSlate = function getSlate(request, callback) { + return this.rpcCall(getSlate, $root.google.cloud.video.stitcher.v1.GetSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); + }, "name", { value: "GetSlate" }); /** - * ListCdnKeysRequest filter. - * @member {string} filter - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Calls GetSlate. + * @function getSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.prototype.filter = ""; /** - * ListCdnKeysRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef UpdateSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateSlate. + * @function updateSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.prototype.orderBy = ""; + Object.defineProperty(VideoStitcherService.prototype.updateSlate = function updateSlate(request, callback) { + return this.rpcCall(updateSlate, $root.google.cloud.video.stitcher.v1.UpdateSlateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateSlate" }); /** - * Creates a new ListCdnKeysRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest instance + * Calls UpdateSlate. + * @function updateSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.create = function create(properties) { - return new ListCdnKeysRequest(properties); - }; /** - * Encodes the specified ListCdnKeysRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef DeleteSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListCdnKeysRequest.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 ListCdnKeysRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteSlate. + * @function deleteSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(VideoStitcherService.prototype.deleteSlate = function deleteSlate(request, callback) { + return this.rpcCall(deleteSlate, $root.google.cloud.video.stitcher.v1.DeleteSlateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSlate" }); /** - * Decodes a ListCdnKeysRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteSlate. + * @function deleteSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.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.stitcher.v1.ListCdnKeysRequest(); - 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; - }; /** - * Decodes a ListCdnKeysRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateLiveSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession */ - ListCdnKeysRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListCdnKeysRequest message. - * @function verify - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateLiveSession. + * @function createLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.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; - }; + Object.defineProperty(VideoStitcherService.prototype.createLiveSession = function createLiveSession(request, callback) { + return this.rpcCall(createLiveSession, $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); + }, "name", { value: "CreateLiveSession" }); /** - * Creates a ListCdnKeysRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest + * Calls CreateLiveSession. + * @function createLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest) - return object; - var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest(); - 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 ListCdnKeysRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {google.cloud.video.stitcher.v1.ListCdnKeysRequest} message ListCdnKeysRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetLiveSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession */ - ListCdnKeysRequest.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; - }; /** - * Converts this ListCdnKeysRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * Calls GetLiveSession. + * @function getLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @returns {undefined} + * @variation 1 */ - ListCdnKeysRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(VideoStitcherService.prototype.getLiveSession = function getLiveSession(request, callback) { + return this.rpcCall(getLiveSession, $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); + }, "name", { value: "GetLiveSession" }); /** - * Gets the default type url for ListCdnKeysRequest - * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls GetLiveSession. + * @function getLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysRequest"; - }; - - return ListCdnKeysRequest; - })(); - - v1.ListCdnKeysResponse = (function() { /** - * Properties of a ListCdnKeysResponse. - * @memberof google.cloud.video.stitcher.v1 - * @interface IListCdnKeysResponse - * @property {Array.|null} [cdnKeys] ListCdnKeysResponse cdnKeys - * @property {string|null} [nextPageToken] ListCdnKeysResponse nextPageToken - * @property {Array.|null} [unreachable] ListCdnKeysResponse unreachable + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveConfig}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateLiveConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new ListCdnKeysResponse. - * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListCdnKeysResponse. - * @implements IListCdnKeysResponse - * @constructor - * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set + * Calls CreateLiveConfig. + * @function createLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest} request CreateLiveConfigRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function ListCdnKeysResponse(properties) { - this.cdnKeys = []; - 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]]; - } + Object.defineProperty(VideoStitcherService.prototype.createLiveConfig = function createLiveConfig(request, callback) { + return this.rpcCall(createLiveConfig, $root.google.cloud.video.stitcher.v1.CreateLiveConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLiveConfig" }); /** - * ListCdnKeysResponse cdnKeys. - * @member {Array.} cdnKeys - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * Calls CreateLiveConfig. + * @function createLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest} request CreateLiveConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysResponse.prototype.cdnKeys = $util.emptyArray; /** - * ListCdnKeysResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse - * @instance + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveConfigs}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListLiveConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} [response] ListLiveConfigsResponse */ - ListCdnKeysResponse.prototype.nextPageToken = ""; /** - * ListCdnKeysResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * Calls ListLiveConfigs. + * @function listLiveConfigs + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest} request ListLiveConfigsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigsCallback} callback Node-style callback called with the error, if any, and ListLiveConfigsResponse + * @returns {undefined} + * @variation 1 */ - ListCdnKeysResponse.prototype.unreachable = $util.emptyArray; + Object.defineProperty(VideoStitcherService.prototype.listLiveConfigs = function listLiveConfigs(request, callback) { + return this.rpcCall(listLiveConfigs, $root.google.cloud.video.stitcher.v1.ListLiveConfigsRequest, $root.google.cloud.video.stitcher.v1.ListLiveConfigsResponse, request, callback); + }, "name", { value: "ListLiveConfigs" }); /** - * Creates a new ListCdnKeysResponse instance using the specified properties. - * @function create - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse - * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse instance + * Calls ListLiveConfigs. + * @function listLiveConfigs + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest} request ListLiveConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListCdnKeysResponse.create = function create(properties) { - return new ListCdnKeysResponse(properties); - }; /** - * Encodes the specified ListCdnKeysResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveConfig}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetLiveConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveConfig} [response] LiveConfig + */ + + /** + * Calls GetLiveConfig. + * @function getLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest} request GetLiveConfigRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfigCallback} callback Node-style callback called with the error, if any, and LiveConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getLiveConfig = function getLiveConfig(request, callback) { + return this.rpcCall(getLiveConfig, $root.google.cloud.video.stitcher.v1.GetLiveConfigRequest, $root.google.cloud.video.stitcher.v1.LiveConfig, request, callback); + }, "name", { value: "GetLiveConfig" }); + + /** + * Calls GetLiveConfig. + * @function getLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest} request GetLiveConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteLiveConfig}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef DeleteLiveConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLiveConfig. + * @function deleteLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest} request DeleteLiveConfigRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.deleteLiveConfig = function deleteLiveConfig(request, callback) { + return this.rpcCall(deleteLiveConfig, $root.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLiveConfig" }); + + /** + * Calls DeleteLiveConfig. + * @function deleteLiveConfig + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest} request DeleteLiveConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return VideoStitcherService; + })(); + + v1.CreateCdnKeyRequest = (function() { + + /** + * Properties of a CreateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateCdnKeyRequest + * @property {string|null} [parent] CreateCdnKeyRequest parent + * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] CreateCdnKeyRequest cdnKey + * @property {string|null} [cdnKeyId] CreateCdnKeyRequest cdnKeyId + */ + + /** + * Constructs a new CreateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateCdnKeyRequest. + * @implements ICreateCdnKeyRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set + */ + function CreateCdnKeyRequest(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]]; + } + + /** + * CreateCdnKeyRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.parent = ""; + + /** + * CreateCdnKeyRequest cdnKey. + * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.cdnKey = null; + + /** + * CreateCdnKeyRequest cdnKeyId. + * @member {string} cdnKeyId + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.cdnKeyId = ""; + + /** + * Creates a new CreateCdnKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest instance + */ + CreateCdnKeyRequest.create = function create(properties) { + return new CreateCdnKeyRequest(properties); + }; + + /** + * Encodes the specified CreateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCdnKeysResponse.encode = function encode(message, writer) { + CreateCdnKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cdnKeys != null && message.cdnKeys.length) - for (var i = 0; i < message.cdnKeys.length; ++i) - $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKeys[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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cdnKeyId != null && Object.hasOwnProperty.call(message, "cdnKeyId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cdnKeyId); return writer; }; /** - * Encodes the specified ListCdnKeysResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * Encodes the specified CreateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCdnKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListCdnKeysResponse message from the specified reader or buffer. + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCdnKeysResponse.decode = function decode(reader, length) { + CreateCdnKeyRequest.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.stitcher.v1.ListCdnKeysResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.cdnKeys && message.cdnKeys.length)) - message.cdnKeys = []; - message.cdnKeys.push($root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.cdnKeyId = reader.string(); break; } default: @@ -9565,169 +10501,148 @@ }; /** - * Decodes a ListCdnKeysResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListCdnKeysResponse.decodeDelimited = function decodeDelimited(reader) { + CreateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListCdnKeysResponse message. + * Verifies a CreateCdnKeyRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListCdnKeysResponse.verify = function verify(message) { + CreateCdnKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cdnKeys != null && message.hasOwnProperty("cdnKeys")) { - if (!Array.isArray(message.cdnKeys)) - return "cdnKeys: array expected"; - for (var i = 0; i < message.cdnKeys.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKeys[i]); - if (error) - return "cdnKeys." + 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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); + if (error) + return "cdnKey." + error; } + if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) + if (!$util.isString(message.cdnKeyId)) + return "cdnKeyId: string expected"; return null; }; /** - * Creates a ListCdnKeysResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest */ - ListCdnKeysResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse) + CreateCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse(); - if (object.cdnKeys) { - if (!Array.isArray(object.cdnKeys)) - throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: array expected"); - message.cdnKeys = []; - for (var i = 0; i < object.cdnKeys.length; ++i) { - if (typeof object.cdnKeys[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: object expected"); - message.cdnKeys[i] = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKeys[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.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.stitcher.v1.CreateCdnKeyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.cdnKey != null) { + if (typeof object.cdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateCdnKeyRequest.cdnKey: object expected"); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); } + if (object.cdnKeyId != null) + message.cdnKeyId = String(object.cdnKeyId); return message; }; /** - * Creates a plain object from a ListCdnKeysResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateCdnKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} message ListCdnKeysResponse + * @param {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} message CreateCdnKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCdnKeysResponse.toObject = function toObject(message, options) { + CreateCdnKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.cdnKeys = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.cdnKeys && message.cdnKeys.length) { - object.cdnKeys = []; - for (var j = 0; j < message.cdnKeys.length; ++j) - object.cdnKeys[j] = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKeys[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.parent = ""; + object.cdnKey = null; + object.cdnKeyId = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) + object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); + if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) + object.cdnKeyId = message.cdnKeyId; return object; }; /** - * Converts this ListCdnKeysResponse to JSON. + * Converts this CreateCdnKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @instance * @returns {Object.} JSON object */ - ListCdnKeysResponse.prototype.toJSON = function toJSON() { + CreateCdnKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListCdnKeysResponse + * Gets the default type url for CreateCdnKeyRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListCdnKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysResponse"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateCdnKeyRequest"; }; - return ListCdnKeysResponse; + return CreateCdnKeyRequest; })(); - v1.GetCdnKeyRequest = (function() { + v1.ListCdnKeysRequest = (function() { /** - * Properties of a GetCdnKeyRequest. + * Properties of a ListCdnKeysRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetCdnKeyRequest - * @property {string|null} [name] GetCdnKeyRequest name + * @interface IListCdnKeysRequest + * @property {string|null} [parent] ListCdnKeysRequest parent + * @property {number|null} [pageSize] ListCdnKeysRequest pageSize + * @property {string|null} [pageToken] ListCdnKeysRequest pageToken + * @property {string|null} [filter] ListCdnKeysRequest filter + * @property {string|null} [orderBy] ListCdnKeysRequest orderBy */ /** - * Constructs a new GetCdnKeyRequest. + * Constructs a new ListCdnKeysRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetCdnKeyRequest. - * @implements IGetCdnKeyRequest + * @classdesc Represents a ListCdnKeysRequest. + * @implements IListCdnKeysRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set */ - function GetCdnKeyRequest(properties) { + function ListCdnKeysRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9735,75 +10650,131 @@ } /** - * GetCdnKeyRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * ListCdnKeysRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @instance */ - GetCdnKeyRequest.prototype.name = ""; + ListCdnKeysRequest.prototype.parent = ""; /** - * Creates a new GetCdnKeyRequest instance using the specified properties. + * ListCdnKeysRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.pageSize = 0; + + /** + * ListCdnKeysRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.pageToken = ""; + + /** + * ListCdnKeysRequest filter. + * @member {string} filter + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.filter = ""; + + /** + * ListCdnKeysRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCdnKeysRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest instance + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest instance */ - GetCdnKeyRequest.create = function create(properties) { - return new GetCdnKeyRequest(properties); + ListCdnKeysRequest.create = function create(properties) { + return new ListCdnKeysRequest(properties); }; /** - * Encodes the specified GetCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * Encodes the specified ListCdnKeysRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCdnKeyRequest.encode = function encode(message, writer) { + ListCdnKeysRequest.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.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 GetCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * Encodes the specified ListCdnKeysRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCdnKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetCdnKeyRequest message from the specified reader or buffer. + * Decodes a ListCdnKeysRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCdnKeyRequest.decode = function decode(reader, length) { + ListCdnKeysRequest.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.stitcher.v1.GetCdnKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest(); 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.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: @@ -9815,122 +10786,159 @@ }; /** - * Decodes a GetCdnKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCdnKeysRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + ListCdnKeysRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetCdnKeyRequest message. + * Verifies a ListCdnKeysRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetCdnKeyRequest.verify = function verify(message) { + ListCdnKeysRequest.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.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 GetCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCdnKeysRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest */ - GetCdnKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest) + ListCdnKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest(); + 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 GetCdnKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCdnKeysRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static - * @param {google.cloud.video.stitcher.v1.GetCdnKeyRequest} message GetCdnKeyRequest + * @param {google.cloud.video.stitcher.v1.ListCdnKeysRequest} message ListCdnKeysRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCdnKeyRequest.toObject = function toObject(message, options) { + ListCdnKeysRequest.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.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; }; /** - * Converts this GetCdnKeyRequest to JSON. + * Converts this ListCdnKeysRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @instance * @returns {Object.} JSON object */ - GetCdnKeyRequest.prototype.toJSON = function toJSON() { + ListCdnKeysRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetCdnKeyRequest + * Gets the default type url for ListCdnKeysRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCdnKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetCdnKeyRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysRequest"; }; - return GetCdnKeyRequest; + return ListCdnKeysRequest; })(); - v1.DeleteCdnKeyRequest = (function() { + v1.ListCdnKeysResponse = (function() { /** - * Properties of a DeleteCdnKeyRequest. + * Properties of a ListCdnKeysResponse. * @memberof google.cloud.video.stitcher.v1 - * @interface IDeleteCdnKeyRequest - * @property {string|null} [name] DeleteCdnKeyRequest name + * @interface IListCdnKeysResponse + * @property {Array.|null} [cdnKeys] ListCdnKeysResponse cdnKeys + * @property {string|null} [nextPageToken] ListCdnKeysResponse nextPageToken + * @property {Array.|null} [unreachable] ListCdnKeysResponse unreachable */ /** - * Constructs a new DeleteCdnKeyRequest. + * Constructs a new ListCdnKeysResponse. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a DeleteCdnKeyRequest. - * @implements IDeleteCdnKeyRequest + * @classdesc Represents a ListCdnKeysResponse. + * @implements IListCdnKeysResponse * @constructor - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set */ - function DeleteCdnKeyRequest(properties) { + function ListCdnKeysResponse(properties) { + this.cdnKeys = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9938,75 +10946,109 @@ } /** - * DeleteCdnKeyRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * ListCdnKeysResponse cdnKeys. + * @member {Array.} cdnKeys + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @instance */ - DeleteCdnKeyRequest.prototype.name = ""; + ListCdnKeysResponse.prototype.cdnKeys = $util.emptyArray; /** - * Creates a new DeleteCdnKeyRequest instance using the specified properties. + * ListCdnKeysResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + */ + ListCdnKeysResponse.prototype.nextPageToken = ""; + + /** + * ListCdnKeysResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + */ + ListCdnKeysResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCdnKeysResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest instance + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse instance */ - DeleteCdnKeyRequest.create = function create(properties) { - return new DeleteCdnKeyRequest(properties); + ListCdnKeysResponse.create = function create(properties) { + return new ListCdnKeysResponse(properties); }; /** - * Encodes the specified DeleteCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * Encodes the specified ListCdnKeysResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCdnKeyRequest.encode = function encode(message, writer) { + ListCdnKeysResponse.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.cdnKeys != null && message.cdnKeys.length) + for (var i = 0; i < message.cdnKeys.length; ++i) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKeys[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 DeleteCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * Encodes the specified ListCdnKeysResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListCdnKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer. + * Decodes a ListCdnKeysResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCdnKeyRequest.decode = function decode(reader, length) { + ListCdnKeysResponse.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.stitcher.v1.DeleteCdnKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.cdnKeys && message.cdnKeys.length)) + message.cdnKeys = []; + message.cdnKeys.push($root.google.cloud.video.stitcher.v1.CdnKey.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: @@ -10018,123 +11060,169 @@ }; /** - * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a ListCdnKeysResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + ListCdnKeysResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteCdnKeyRequest message. + * Verifies a ListCdnKeysResponse message. * @function verify - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteCdnKeyRequest.verify = function verify(message) { + ListCdnKeysResponse.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.cdnKeys != null && message.hasOwnProperty("cdnKeys")) { + if (!Array.isArray(message.cdnKeys)) + return "cdnKeys: array expected"; + for (var i = 0; i < message.cdnKeys.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKeys[i]); + if (error) + return "cdnKeys." + 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; }; /** - * Creates a DeleteCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListCdnKeysResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse */ - DeleteCdnKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest) + ListCdnKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse) return object; - var message = new $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse(); + if (object.cdnKeys) { + if (!Array.isArray(object.cdnKeys)) + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: array expected"); + message.cdnKeys = []; + for (var i = 0; i < object.cdnKeys.length; ++i) { + if (typeof object.cdnKeys[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: object expected"); + message.cdnKeys[i] = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKeys[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteCdnKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListCdnKeysResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static - * @param {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} message DeleteCdnKeyRequest + * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} message ListCdnKeysResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCdnKeyRequest.toObject = function toObject(message, options) { + ListCdnKeysResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.cdnKeys = []; + object.unreachable = []; + } if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.cdnKeys && message.cdnKeys.length) { + object.cdnKeys = []; + for (var j = 0; j < message.cdnKeys.length; ++j) + object.cdnKeys[j] = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKeys[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; }; /** - * Converts this DeleteCdnKeyRequest to JSON. + * Converts this ListCdnKeysResponse to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @instance * @returns {Object.} JSON object */ - DeleteCdnKeyRequest.prototype.toJSON = function toJSON() { + ListCdnKeysResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteCdnKeyRequest + * Gets the default type url for ListCdnKeysResponse * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListCdnKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteCdnKeyRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysResponse"; }; - return DeleteCdnKeyRequest; + return ListCdnKeysResponse; })(); - v1.UpdateCdnKeyRequest = (function() { + v1.GetCdnKeyRequest = (function() { /** - * Properties of an UpdateCdnKeyRequest. + * Properties of a GetCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IUpdateCdnKeyRequest - * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] UpdateCdnKeyRequest cdnKey - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCdnKeyRequest updateMask + * @interface IGetCdnKeyRequest + * @property {string|null} [name] GetCdnKeyRequest name */ /** - * Constructs a new UpdateCdnKeyRequest. + * Constructs a new GetCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents an UpdateCdnKeyRequest. - * @implements IUpdateCdnKeyRequest + * @classdesc Represents a GetCdnKeyRequest. + * @implements IGetCdnKeyRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set */ - function UpdateCdnKeyRequest(properties) { + function GetCdnKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10142,89 +11230,75 @@ } /** - * UpdateCdnKeyRequest cdnKey. - * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * GetCdnKeyRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @instance */ - UpdateCdnKeyRequest.prototype.cdnKey = null; + GetCdnKeyRequest.prototype.name = ""; /** - * UpdateCdnKeyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest - * @instance - */ - UpdateCdnKeyRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateCdnKeyRequest instance using the specified properties. + * Creates a new GetCdnKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest instance + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest instance */ - UpdateCdnKeyRequest.create = function create(properties) { - return new UpdateCdnKeyRequest(properties); + GetCdnKeyRequest.create = function create(properties) { + return new GetCdnKeyRequest(properties); }; /** - * Encodes the specified UpdateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * Encodes the specified GetCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCdnKeyRequest.encode = function encode(message, writer) { + GetCdnKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) - $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, 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); return writer; }; /** - * Encodes the specified UpdateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * Encodes the specified GetCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer. + * Decodes a GetCdnKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCdnKeyRequest.decode = function decode(reader, length) { + GetCdnKeyRequest.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.stitcher.v1.UpdateCdnKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -10236,142 +11310,122 @@ }; /** - * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCdnKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + GetCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateCdnKeyRequest message. + * Verifies a GetCdnKeyRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateCdnKeyRequest.verify = function verify(message) { + GetCdnKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) { - var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); - if (error) - return "cdnKey." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCdnKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest */ - UpdateCdnKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest) + GetCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest(); - if (object.cdnKey != null) { - if (typeof object.cdnKey !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.cdnKey: object expected"); - message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateCdnKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCdnKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} message UpdateCdnKeyRequest + * @param {google.cloud.video.stitcher.v1.GetCdnKeyRequest} message GetCdnKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCdnKeyRequest.toObject = function toObject(message, options) { + GetCdnKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.cdnKey = null; - object.updateMask = null; - } - if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) - object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateCdnKeyRequest to JSON. + * Converts this GetCdnKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @instance * @returns {Object.} JSON object */ - UpdateCdnKeyRequest.prototype.toJSON = function toJSON() { + GetCdnKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateCdnKeyRequest + * Gets the default type url for GetCdnKeyRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateCdnKeyRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetCdnKeyRequest"; }; - return UpdateCdnKeyRequest; + return GetCdnKeyRequest; })(); - v1.CreateVodSessionRequest = (function() { + v1.DeleteCdnKeyRequest = (function() { /** - * Properties of a CreateVodSessionRequest. + * Properties of a DeleteCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface ICreateVodSessionRequest - * @property {string|null} [parent] CreateVodSessionRequest parent - * @property {google.cloud.video.stitcher.v1.IVodSession|null} [vodSession] CreateVodSessionRequest vodSession + * @interface IDeleteCdnKeyRequest + * @property {string|null} [name] DeleteCdnKeyRequest name */ /** - * Constructs a new CreateVodSessionRequest. + * Constructs a new DeleteCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a CreateVodSessionRequest. - * @implements ICreateVodSessionRequest + * @classdesc Represents a DeleteCdnKeyRequest. + * @implements IDeleteCdnKeyRequest * @constructor - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set */ - function CreateVodSessionRequest(properties) { + function DeleteCdnKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10379,89 +11433,75 @@ } /** - * CreateVodSessionRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest - * @instance - */ - CreateVodSessionRequest.prototype.parent = ""; - - /** - * CreateVodSessionRequest vodSession. - * @member {google.cloud.video.stitcher.v1.IVodSession|null|undefined} vodSession - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * DeleteCdnKeyRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @instance */ - CreateVodSessionRequest.prototype.vodSession = null; + DeleteCdnKeyRequest.prototype.name = ""; /** - * Creates a new CreateVodSessionRequest instance using the specified properties. + * Creates a new DeleteCdnKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest instance + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest instance */ - CreateVodSessionRequest.create = function create(properties) { - return new CreateVodSessionRequest(properties); + DeleteCdnKeyRequest.create = function create(properties) { + return new DeleteCdnKeyRequest(properties); }; /** - * Encodes the specified CreateVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * Encodes the specified DeleteCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVodSessionRequest.encode = function encode(message, writer) { + DeleteCdnKeyRequest.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.vodSession != null && Object.hasOwnProperty.call(message, "vodSession")) - $root.google.cloud.video.stitcher.v1.VodSession.encode(message.vodSession, 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); return writer; }; /** - * Encodes the specified CreateVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * Encodes the specified DeleteCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateVodSessionRequest message from the specified reader or buffer. + * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVodSessionRequest.decode = function decode(reader, length) { + DeleteCdnKeyRequest.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.stitcher.v1.CreateVodSessionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -10473,136 +11513,123 @@ }; /** - * Decodes a CreateVodSessionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateVodSessionRequest message. + * Verifies a DeleteCdnKeyRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateVodSessionRequest.verify = function verify(message) { + DeleteCdnKeyRequest.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.vodSession != null && message.hasOwnProperty("vodSession")) { - var error = $root.google.cloud.video.stitcher.v1.VodSession.verify(message.vodSession); - if (error) - return "vodSession." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteCdnKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest */ - CreateVodSessionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest) + DeleteCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.vodSession != null) { - if (typeof object.vodSession !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.CreateVodSessionRequest.vodSession: object expected"); - message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.fromObject(object.vodSession); - } + var message = new $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateVodSessionRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteCdnKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.CreateVodSessionRequest} message CreateVodSessionRequest + * @param {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} message DeleteCdnKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateVodSessionRequest.toObject = function toObject(message, options) { + DeleteCdnKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.vodSession = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.vodSession != null && message.hasOwnProperty("vodSession")) - object.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.toObject(message.vodSession, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateVodSessionRequest to JSON. + * Converts this DeleteCdnKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @instance * @returns {Object.} JSON object */ - CreateVodSessionRequest.prototype.toJSON = function toJSON() { + DeleteCdnKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateVodSessionRequest + * Gets the default type url for DeleteCdnKeyRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateVodSessionRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteCdnKeyRequest"; }; - return CreateVodSessionRequest; + return DeleteCdnKeyRequest; })(); - v1.GetVodSessionRequest = (function() { + v1.UpdateCdnKeyRequest = (function() { /** - * Properties of a GetVodSessionRequest. + * Properties of an UpdateCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetVodSessionRequest - * @property {string|null} [name] GetVodSessionRequest name + * @interface IUpdateCdnKeyRequest + * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] UpdateCdnKeyRequest cdnKey + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCdnKeyRequest updateMask */ /** - * Constructs a new GetVodSessionRequest. + * Constructs a new UpdateCdnKeyRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetVodSessionRequest. - * @implements IGetVodSessionRequest + * @classdesc Represents an UpdateCdnKeyRequest. + * @implements IUpdateCdnKeyRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set */ - function GetVodSessionRequest(properties) { + function UpdateCdnKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10610,75 +11637,89 @@ } /** - * GetVodSessionRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * UpdateCdnKeyRequest cdnKey. + * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @instance */ - GetVodSessionRequest.prototype.name = ""; + UpdateCdnKeyRequest.prototype.cdnKey = null; /** - * Creates a new GetVodSessionRequest instance using the specified properties. + * UpdateCdnKeyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @instance + */ + UpdateCdnKeyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCdnKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest instance + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest instance */ - GetVodSessionRequest.create = function create(properties) { - return new GetVodSessionRequest(properties); + UpdateCdnKeyRequest.create = function create(properties) { + return new UpdateCdnKeyRequest(properties); }; /** - * Encodes the specified GetVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * Encodes the specified UpdateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodSessionRequest.encode = function encode(message, writer) { + UpdateCdnKeyRequest.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.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * Encodes the specified UpdateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVodSessionRequest message from the specified reader or buffer. + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodSessionRequest.decode = function decode(reader, length) { + UpdateCdnKeyRequest.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.stitcher.v1.GetVodSessionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -10690,124 +11731,142 @@ }; /** - * Decodes a GetVodSessionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVodSessionRequest message. + * Verifies an UpdateCdnKeyRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVodSessionRequest.verify = function verify(message) { + UpdateCdnKeyRequest.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.cdnKey != null && message.hasOwnProperty("cdnKey")) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); + if (error) + return "cdnKey." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a GetVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest */ - GetVodSessionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodSessionRequest) + UpdateCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetVodSessionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest(); + if (object.cdnKey != null) { + if (typeof object.cdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.cdnKey: object expected"); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a GetVodSessionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCdnKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static - * @param {google.cloud.video.stitcher.v1.GetVodSessionRequest} message GetVodSessionRequest + * @param {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} message UpdateCdnKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVodSessionRequest.toObject = function toObject(message, options) { + UpdateCdnKeyRequest.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.cdnKey = null; + object.updateMask = null; + } + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) + object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this GetVodSessionRequest to JSON. + * Converts this UpdateCdnKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @instance * @returns {Object.} JSON object */ - GetVodSessionRequest.prototype.toJSON = function toJSON() { + UpdateCdnKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetVodSessionRequest + * Gets the default type url for UpdateCdnKeyRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodSessionRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateCdnKeyRequest"; }; - return GetVodSessionRequest; + return UpdateCdnKeyRequest; })(); - v1.ListVodStitchDetailsRequest = (function() { + v1.CreateVodSessionRequest = (function() { /** - * Properties of a ListVodStitchDetailsRequest. + * Properties of a CreateVodSessionRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListVodStitchDetailsRequest - * @property {string|null} [parent] ListVodStitchDetailsRequest parent - * @property {number|null} [pageSize] ListVodStitchDetailsRequest pageSize - * @property {string|null} [pageToken] ListVodStitchDetailsRequest pageToken + * @interface ICreateVodSessionRequest + * @property {string|null} [parent] CreateVodSessionRequest parent + * @property {google.cloud.video.stitcher.v1.IVodSession|null} [vodSession] CreateVodSessionRequest vodSession */ /** - * Constructs a new ListVodStitchDetailsRequest. + * Constructs a new CreateVodSessionRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListVodStitchDetailsRequest. - * @implements IListVodStitchDetailsRequest + * @classdesc Represents a CreateVodSessionRequest. + * @implements ICreateVodSessionRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set */ - function ListVodStitchDetailsRequest(properties) { + function CreateVodSessionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10815,90 +11874,80 @@ } /** - * ListVodStitchDetailsRequest parent. + * CreateVodSessionRequest parent. * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @instance */ - ListVodStitchDetailsRequest.prototype.parent = ""; + CreateVodSessionRequest.prototype.parent = ""; /** - * ListVodStitchDetailsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * CreateVodSessionRequest vodSession. + * @member {google.cloud.video.stitcher.v1.IVodSession|null|undefined} vodSession + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @instance */ - ListVodStitchDetailsRequest.prototype.pageSize = 0; - - /** - * ListVodStitchDetailsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest - * @instance - */ - ListVodStitchDetailsRequest.prototype.pageToken = ""; + CreateVodSessionRequest.prototype.vodSession = null; /** - * Creates a new ListVodStitchDetailsRequest instance using the specified properties. + * Creates a new CreateVodSessionRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest instance + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest instance */ - ListVodStitchDetailsRequest.create = function create(properties) { - return new ListVodStitchDetailsRequest(properties); + CreateVodSessionRequest.create = function create(properties) { + return new CreateVodSessionRequest(properties); }; /** - * Encodes the specified ListVodStitchDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * Encodes the specified CreateVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodStitchDetailsRequest.encode = function encode(message, writer) { + CreateVodSessionRequest.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.vodSession != null && Object.hasOwnProperty.call(message, "vodSession")) + $root.google.cloud.video.stitcher.v1.VodSession.encode(message.vodSession, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListVodStitchDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * Encodes the specified CreateVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodStitchDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer. + * Decodes a CreateVodSessionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodStitchDetailsRequest.decode = function decode(reader, length) { + CreateVodSessionRequest.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.stitcher.v1.ListVodStitchDetailsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10907,11 +11956,7 @@ break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.decode(reader, reader.uint32()); break; } default: @@ -10923,141 +11968,136 @@ }; /** - * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateVodSessionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodStitchDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVodStitchDetailsRequest message. + * Verifies a CreateVodSessionRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVodStitchDetailsRequest.verify = function verify(message) { + CreateVodSessionRequest.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.vodSession != null && message.hasOwnProperty("vodSession")) { + var error = $root.google.cloud.video.stitcher.v1.VodSession.verify(message.vodSession); + if (error) + return "vodSession." + error; + } return null; }; /** - * Creates a ListVodStitchDetailsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVodSessionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest */ - ListVodStitchDetailsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest) + CreateVodSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest(); + var message = new $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest(); 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.vodSession != null) { + if (typeof object.vodSession !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateVodSessionRequest.vodSession: object expected"); + message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.fromObject(object.vodSession); + } return message; }; /** - * Creates a plain object from a ListVodStitchDetailsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateVodSessionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} message ListVodStitchDetailsRequest + * @param {google.cloud.video.stitcher.v1.CreateVodSessionRequest} message CreateVodSessionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVodStitchDetailsRequest.toObject = function toObject(message, options) { + CreateVodSessionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.vodSession = null; } 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.vodSession != null && message.hasOwnProperty("vodSession")) + object.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.toObject(message.vodSession, options); return object; }; /** - * Converts this ListVodStitchDetailsRequest to JSON. + * Converts this CreateVodSessionRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @instance * @returns {Object.} JSON object */ - ListVodStitchDetailsRequest.prototype.toJSON = function toJSON() { + CreateVodSessionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVodStitchDetailsRequest + * Gets the default type url for CreateVodSessionRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVodStitchDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateVodSessionRequest"; }; - return ListVodStitchDetailsRequest; + return CreateVodSessionRequest; })(); - v1.ListVodStitchDetailsResponse = (function() { + v1.GetVodSessionRequest = (function() { /** - * Properties of a ListVodStitchDetailsResponse. + * Properties of a GetVodSessionRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListVodStitchDetailsResponse - * @property {Array.|null} [vodStitchDetails] ListVodStitchDetailsResponse vodStitchDetails - * @property {string|null} [nextPageToken] ListVodStitchDetailsResponse nextPageToken + * @interface IGetVodSessionRequest + * @property {string|null} [name] GetVodSessionRequest name */ /** - * Constructs a new ListVodStitchDetailsResponse. + * Constructs a new GetVodSessionRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListVodStitchDetailsResponse. - * @implements IListVodStitchDetailsResponse + * @classdesc Represents a GetVodSessionRequest. + * @implements IGetVodSessionRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set */ - function ListVodStitchDetailsResponse(properties) { - this.vodStitchDetails = []; + function GetVodSessionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11065,92 +12105,75 @@ } /** - * ListVodStitchDetailsResponse vodStitchDetails. - * @member {Array.} vodStitchDetails - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse - * @instance - */ - ListVodStitchDetailsResponse.prototype.vodStitchDetails = $util.emptyArray; - - /** - * ListVodStitchDetailsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * GetVodSessionRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @instance */ - ListVodStitchDetailsResponse.prototype.nextPageToken = ""; + GetVodSessionRequest.prototype.name = ""; /** - * Creates a new ListVodStitchDetailsResponse instance using the specified properties. + * Creates a new GetVodSessionRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse instance + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest instance */ - ListVodStitchDetailsResponse.create = function create(properties) { - return new ListVodStitchDetailsResponse(properties); + GetVodSessionRequest.create = function create(properties) { + return new GetVodSessionRequest(properties); }; /** - * Encodes the specified ListVodStitchDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodStitchDetailsResponse.encode = function encode(message, writer) { + GetVodSessionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vodStitchDetails != null && message.vodStitchDetails.length) - for (var i = 0; i < message.vodStitchDetails.length; ++i) - $root.google.cloud.video.stitcher.v1.VodStitchDetail.encode(message.vodStitchDetails[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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListVodStitchDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodStitchDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer. + * Decodes a GetVodSessionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodStitchDetailsResponse.decode = function decode(reader, length) { + GetVodSessionRequest.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.stitcher.v1.ListVodStitchDetailsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodSessionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.vodStitchDetails && message.vodStitchDetails.length)) - message.vodStitchDetails = []; - message.vodStitchDetails.push($root.google.cloud.video.stitcher.v1.VodStitchDetail.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -11162,148 +12185,124 @@ }; /** - * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVodSessionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodStitchDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + GetVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVodStitchDetailsResponse message. + * Verifies a GetVodSessionRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVodStitchDetailsResponse.verify = function verify(message) { + GetVodSessionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vodStitchDetails != null && message.hasOwnProperty("vodStitchDetails")) { - if (!Array.isArray(message.vodStitchDetails)) - return "vodStitchDetails: array expected"; - for (var i = 0; i < message.vodStitchDetails.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.VodStitchDetail.verify(message.vodStitchDetails[i]); - if (error) - return "vodStitchDetails." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListVodStitchDetailsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVodSessionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest */ - ListVodStitchDetailsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse) + GetVodSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodSessionRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse(); - if (object.vodStitchDetails) { - if (!Array.isArray(object.vodStitchDetails)) - throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: array expected"); - message.vodStitchDetails = []; - for (var i = 0; i < object.vodStitchDetails.length; ++i) { - if (typeof object.vodStitchDetails[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: object expected"); - message.vodStitchDetails[i] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.fromObject(object.vodStitchDetails[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.video.stitcher.v1.GetVodSessionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListVodStitchDetailsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVodSessionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static - * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} message ListVodStitchDetailsResponse + * @param {google.cloud.video.stitcher.v1.GetVodSessionRequest} message GetVodSessionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVodStitchDetailsResponse.toObject = function toObject(message, options) { + GetVodSessionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.vodStitchDetails = []; if (options.defaults) - object.nextPageToken = ""; - if (message.vodStitchDetails && message.vodStitchDetails.length) { - object.vodStitchDetails = []; - for (var j = 0; j < message.vodStitchDetails.length; ++j) - object.vodStitchDetails[j] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.toObject(message.vodStitchDetails[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListVodStitchDetailsResponse to JSON. + * Converts this GetVodSessionRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @instance * @returns {Object.} JSON object */ - ListVodStitchDetailsResponse.prototype.toJSON = function toJSON() { + GetVodSessionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVodStitchDetailsResponse + * Gets the default type url for GetVodSessionRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVodStitchDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodSessionRequest"; }; - return ListVodStitchDetailsResponse; + return GetVodSessionRequest; })(); - v1.GetVodStitchDetailRequest = (function() { + v1.ListVodStitchDetailsRequest = (function() { /** - * Properties of a GetVodStitchDetailRequest. + * Properties of a ListVodStitchDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetVodStitchDetailRequest - * @property {string|null} [name] GetVodStitchDetailRequest name + * @interface IListVodStitchDetailsRequest + * @property {string|null} [parent] ListVodStitchDetailsRequest parent + * @property {number|null} [pageSize] ListVodStitchDetailsRequest pageSize + * @property {string|null} [pageToken] ListVodStitchDetailsRequest pageToken */ /** - * Constructs a new GetVodStitchDetailRequest. + * Constructs a new ListVodStitchDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetVodStitchDetailRequest. - * @implements IGetVodStitchDetailRequest + * @classdesc Represents a ListVodStitchDetailsRequest. + * @implements IListVodStitchDetailsRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set */ - function GetVodStitchDetailRequest(properties) { + function ListVodStitchDetailsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11311,75 +12310,103 @@ } /** - * GetVodStitchDetailRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * ListVodStitchDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @instance */ - GetVodStitchDetailRequest.prototype.name = ""; + ListVodStitchDetailsRequest.prototype.parent = ""; /** - * Creates a new GetVodStitchDetailRequest instance using the specified properties. + * ListVodStitchDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + */ + ListVodStitchDetailsRequest.prototype.pageSize = 0; + + /** + * ListVodStitchDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + */ + ListVodStitchDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListVodStitchDetailsRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest instance + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest instance */ - GetVodStitchDetailRequest.create = function create(properties) { - return new GetVodStitchDetailRequest(properties); + ListVodStitchDetailsRequest.create = function create(properties) { + return new ListVodStitchDetailsRequest(properties); }; /** - * Encodes the specified GetVodStitchDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * Encodes the specified ListVodStitchDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodStitchDetailRequest.encode = function encode(message, writer) { + ListVodStitchDetailsRequest.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.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); return writer; }; /** - * Encodes the specified GetVodStitchDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * Encodes the specified ListVodStitchDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodStitchDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListVodStitchDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer. + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodStitchDetailRequest.decode = function decode(reader, length) { + ListVodStitchDetailsRequest.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.stitcher.v1.GetVodStitchDetailRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest(); 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.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -11391,124 +12418,141 @@ }; /** - * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodStitchDetailRequest.decodeDelimited = function decodeDelimited(reader) { + ListVodStitchDetailsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVodStitchDetailRequest message. + * Verifies a ListVodStitchDetailsRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVodStitchDetailRequest.verify = function verify(message) { + ListVodStitchDetailsRequest.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.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"; return null; }; /** - * Creates a GetVodStitchDetailRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVodStitchDetailsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest */ - GetVodStitchDetailRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest) + ListVodStitchDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest(); + 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); return message; }; /** - * Creates a plain object from a GetVodStitchDetailRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListVodStitchDetailsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} message GetVodStitchDetailRequest + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} message ListVodStitchDetailsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVodStitchDetailRequest.toObject = function toObject(message, options) { + ListVodStitchDetailsRequest.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.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; return object; }; /** - * Converts this GetVodStitchDetailRequest to JSON. + * Converts this ListVodStitchDetailsRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @instance * @returns {Object.} JSON object */ - GetVodStitchDetailRequest.prototype.toJSON = function toJSON() { + ListVodStitchDetailsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetVodStitchDetailRequest + * Gets the default type url for ListVodStitchDetailsRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetVodStitchDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListVodStitchDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodStitchDetailRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest"; }; - return GetVodStitchDetailRequest; + return ListVodStitchDetailsRequest; })(); - v1.ListVodAdTagDetailsRequest = (function() { + v1.ListVodStitchDetailsResponse = (function() { /** - * Properties of a ListVodAdTagDetailsRequest. + * Properties of a ListVodStitchDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @interface IListVodAdTagDetailsRequest - * @property {string|null} [parent] ListVodAdTagDetailsRequest parent - * @property {number|null} [pageSize] ListVodAdTagDetailsRequest pageSize - * @property {string|null} [pageToken] ListVodAdTagDetailsRequest pageToken + * @interface IListVodStitchDetailsResponse + * @property {Array.|null} [vodStitchDetails] ListVodStitchDetailsResponse vodStitchDetails + * @property {string|null} [nextPageToken] ListVodStitchDetailsResponse nextPageToken */ /** - * Constructs a new ListVodAdTagDetailsRequest. + * Constructs a new ListVodStitchDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListVodAdTagDetailsRequest. - * @implements IListVodAdTagDetailsRequest + * @classdesc Represents a ListVodStitchDetailsResponse. + * @implements IListVodStitchDetailsResponse * @constructor - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set */ - function ListVodAdTagDetailsRequest(properties) { + function ListVodStitchDetailsResponse(properties) { + this.vodStitchDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11516,103 +12560,92 @@ } /** - * ListVodAdTagDetailsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest - * @instance - */ - ListVodAdTagDetailsRequest.prototype.parent = ""; - - /** - * ListVodAdTagDetailsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * ListVodStitchDetailsResponse vodStitchDetails. + * @member {Array.} vodStitchDetails + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @instance */ - ListVodAdTagDetailsRequest.prototype.pageSize = 0; + ListVodStitchDetailsResponse.prototype.vodStitchDetails = $util.emptyArray; /** - * ListVodAdTagDetailsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * ListVodStitchDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @instance */ - ListVodAdTagDetailsRequest.prototype.pageToken = ""; + ListVodStitchDetailsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListVodAdTagDetailsRequest instance using the specified properties. + * Creates a new ListVodStitchDetailsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest instance + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse instance */ - ListVodAdTagDetailsRequest.create = function create(properties) { - return new ListVodAdTagDetailsRequest(properties); + ListVodStitchDetailsResponse.create = function create(properties) { + return new ListVodStitchDetailsResponse(properties); }; /** - * Encodes the specified ListVodAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * Encodes the specified ListVodStitchDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodAdTagDetailsRequest.encode = function encode(message, writer) { + ListVodStitchDetailsResponse.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.vodStitchDetails != null && message.vodStitchDetails.length) + for (var i = 0; i < message.vodStitchDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.VodStitchDetail.encode(message.vodStitchDetails[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); return writer; }; /** - * Encodes the specified ListVodAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * Encodes the specified ListVodStitchDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListVodStitchDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer. + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodAdTagDetailsRequest.decode = function decode(reader, length) { + ListVodStitchDetailsResponse.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.stitcher.v1.ListVodAdTagDetailsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.vodStitchDetails && message.vodStitchDetails.length)) + message.vodStitchDetails = []; + message.vodStitchDetails.push($root.google.cloud.video.stitcher.v1.VodStitchDetail.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -11624,141 +12657,148 @@ }; /** - * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + ListVodStitchDetailsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVodAdTagDetailsRequest message. + * Verifies a ListVodStitchDetailsResponse message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVodAdTagDetailsRequest.verify = function verify(message) { + ListVodStitchDetailsResponse.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.vodStitchDetails != null && message.hasOwnProperty("vodStitchDetails")) { + if (!Array.isArray(message.vodStitchDetails)) + return "vodStitchDetails: array expected"; + for (var i = 0; i < message.vodStitchDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodStitchDetail.verify(message.vodStitchDetails[i]); + if (error) + return "vodStitchDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListVodAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVodStitchDetailsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse */ - ListVodAdTagDetailsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest) + ListVodStitchDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest(); - 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); + var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse(); + if (object.vodStitchDetails) { + if (!Array.isArray(object.vodStitchDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: array expected"); + message.vodStitchDetails = []; + for (var i = 0; i < object.vodStitchDetails.length; ++i) { + if (typeof object.vodStitchDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: object expected"); + message.vodStitchDetails[i] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.fromObject(object.vodStitchDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListVodAdTagDetailsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListVodStitchDetailsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} message ListVodStitchDetailsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVodAdTagDetailsRequest.toObject = function toObject(message, options) { + ListVodStitchDetailsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) + object.vodStitchDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vodStitchDetails && message.vodStitchDetails.length) { + object.vodStitchDetails = []; + for (var j = 0; j < message.vodStitchDetails.length; ++j) + object.vodStitchDetails[j] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.toObject(message.vodStitchDetails[j], options); } - 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListVodAdTagDetailsRequest to JSON. + * Converts this ListVodStitchDetailsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @instance * @returns {Object.} JSON object */ - ListVodAdTagDetailsRequest.prototype.toJSON = function toJSON() { + ListVodStitchDetailsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVodAdTagDetailsRequest + * Gets the default type url for ListVodStitchDetailsResponse * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVodAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListVodStitchDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"; }; - return ListVodAdTagDetailsRequest; + return ListVodStitchDetailsResponse; })(); - v1.ListVodAdTagDetailsResponse = (function() { + v1.GetVodStitchDetailRequest = (function() { /** - * Properties of a ListVodAdTagDetailsResponse. + * Properties of a GetVodStitchDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListVodAdTagDetailsResponse - * @property {Array.|null} [vodAdTagDetails] ListVodAdTagDetailsResponse vodAdTagDetails - * @property {string|null} [nextPageToken] ListVodAdTagDetailsResponse nextPageToken + * @interface IGetVodStitchDetailRequest + * @property {string|null} [name] GetVodStitchDetailRequest name */ /** - * Constructs a new ListVodAdTagDetailsResponse. + * Constructs a new GetVodStitchDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListVodAdTagDetailsResponse. - * @implements IListVodAdTagDetailsResponse + * @classdesc Represents a GetVodStitchDetailRequest. + * @implements IGetVodStitchDetailRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set */ - function ListVodAdTagDetailsResponse(properties) { - this.vodAdTagDetails = []; + function GetVodStitchDetailRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11766,92 +12806,75 @@ } /** - * ListVodAdTagDetailsResponse vodAdTagDetails. - * @member {Array.} vodAdTagDetails - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse - * @instance - */ - ListVodAdTagDetailsResponse.prototype.vodAdTagDetails = $util.emptyArray; - - /** - * ListVodAdTagDetailsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * GetVodStitchDetailRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @instance */ - ListVodAdTagDetailsResponse.prototype.nextPageToken = ""; + GetVodStitchDetailRequest.prototype.name = ""; /** - * Creates a new ListVodAdTagDetailsResponse instance using the specified properties. + * Creates a new GetVodStitchDetailRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse instance + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest instance */ - ListVodAdTagDetailsResponse.create = function create(properties) { - return new ListVodAdTagDetailsResponse(properties); + GetVodStitchDetailRequest.create = function create(properties) { + return new GetVodStitchDetailRequest(properties); }; /** - * Encodes the specified ListVodAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodStitchDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodAdTagDetailsResponse.encode = function encode(message, writer) { + GetVodStitchDetailRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vodAdTagDetails != null && message.vodAdTagDetails.length) - for (var i = 0; i < message.vodAdTagDetails.length; ++i) - $root.google.cloud.video.stitcher.v1.VodAdTagDetail.encode(message.vodAdTagDetails[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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListVodAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodStitchDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVodAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVodStitchDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer. + * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodAdTagDetailsResponse.decode = function decode(reader, length) { + GetVodStitchDetailRequest.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.stitcher.v1.ListVodAdTagDetailsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.vodAdTagDetails && message.vodAdTagDetails.length)) - message.vodAdTagDetails = []; - message.vodAdTagDetails.push($root.google.cloud.video.stitcher.v1.VodAdTagDetail.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -11863,148 +12886,124 @@ }; /** - * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVodAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + GetVodStitchDetailRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVodAdTagDetailsResponse message. + * Verifies a GetVodStitchDetailRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVodAdTagDetailsResponse.verify = function verify(message) { + GetVodStitchDetailRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vodAdTagDetails != null && message.hasOwnProperty("vodAdTagDetails")) { - if (!Array.isArray(message.vodAdTagDetails)) - return "vodAdTagDetails: array expected"; - for (var i = 0; i < message.vodAdTagDetails.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.verify(message.vodAdTagDetails[i]); - if (error) - return "vodAdTagDetails." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListVodAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVodStitchDetailRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest */ - ListVodAdTagDetailsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse) + GetVodStitchDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse(); - if (object.vodAdTagDetails) { - if (!Array.isArray(object.vodAdTagDetails)) - throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: array expected"); - message.vodAdTagDetails = []; - for (var i = 0; i < object.vodAdTagDetails.length; ++i) { - if (typeof object.vodAdTagDetails[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: object expected"); - message.vodAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.fromObject(object.vodAdTagDetails[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListVodAdTagDetailsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVodStitchDetailRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse + * @param {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} message GetVodStitchDetailRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVodAdTagDetailsResponse.toObject = function toObject(message, options) { + GetVodStitchDetailRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.vodAdTagDetails = []; if (options.defaults) - object.nextPageToken = ""; - if (message.vodAdTagDetails && message.vodAdTagDetails.length) { - object.vodAdTagDetails = []; - for (var j = 0; j < message.vodAdTagDetails.length; ++j) - object.vodAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.toObject(message.vodAdTagDetails[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListVodAdTagDetailsResponse to JSON. + * Converts this GetVodStitchDetailRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @instance * @returns {Object.} JSON object */ - ListVodAdTagDetailsResponse.prototype.toJSON = function toJSON() { + GetVodStitchDetailRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVodAdTagDetailsResponse + * Gets the default type url for GetVodStitchDetailRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVodAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetVodStitchDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodStitchDetailRequest"; }; - return ListVodAdTagDetailsResponse; + return GetVodStitchDetailRequest; })(); - v1.GetVodAdTagDetailRequest = (function() { + v1.ListVodAdTagDetailsRequest = (function() { /** - * Properties of a GetVodAdTagDetailRequest. + * Properties of a ListVodAdTagDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetVodAdTagDetailRequest - * @property {string|null} [name] GetVodAdTagDetailRequest name + * @interface IListVodAdTagDetailsRequest + * @property {string|null} [parent] ListVodAdTagDetailsRequest parent + * @property {number|null} [pageSize] ListVodAdTagDetailsRequest pageSize + * @property {string|null} [pageToken] ListVodAdTagDetailsRequest pageToken */ /** - * Constructs a new GetVodAdTagDetailRequest. + * Constructs a new ListVodAdTagDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetVodAdTagDetailRequest. - * @implements IGetVodAdTagDetailRequest + * @classdesc Represents a ListVodAdTagDetailsRequest. + * @implements IListVodAdTagDetailsRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set */ - function GetVodAdTagDetailRequest(properties) { + function ListVodAdTagDetailsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12012,75 +13011,103 @@ } /** - * GetVodAdTagDetailRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * ListVodAdTagDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @instance */ - GetVodAdTagDetailRequest.prototype.name = ""; + ListVodAdTagDetailsRequest.prototype.parent = ""; /** - * Creates a new GetVodAdTagDetailRequest instance using the specified properties. + * ListVodAdTagDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + */ + ListVodAdTagDetailsRequest.prototype.pageSize = 0; + + /** + * ListVodAdTagDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + */ + ListVodAdTagDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListVodAdTagDetailsRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest instance */ - GetVodAdTagDetailRequest.create = function create(properties) { - return new GetVodAdTagDetailRequest(properties); + ListVodAdTagDetailsRequest.create = function create(properties) { + return new ListVodAdTagDetailsRequest(properties); }; /** - * Encodes the specified GetVodAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * Encodes the specified ListVodAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodAdTagDetailRequest.encode = function encode(message, writer) { + ListVodAdTagDetailsRequest.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.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); return writer; }; /** - * Encodes the specified GetVodAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * Encodes the specified ListVodAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVodAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListVodAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer. + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodAdTagDetailRequest.decode = function decode(reader, length) { + ListVodAdTagDetailsRequest.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.stitcher.v1.GetVodAdTagDetailRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest(); 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.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -12092,124 +13119,141 @@ }; /** - * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVodAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { + ListVodAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVodAdTagDetailRequest message. + * Verifies a ListVodAdTagDetailsRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVodAdTagDetailRequest.verify = function verify(message) { + ListVodAdTagDetailsRequest.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 GetVodAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest - * @static + 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"; + return null; + }; + + /** + * Creates a ListVodAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest */ - GetVodAdTagDetailRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest) + ListVodAdTagDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest(); + 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); return message; }; /** - * Creates a plain object from a GetVodAdTagDetailRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListVodAdTagDetailsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} message GetVodAdTagDetailRequest + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVodAdTagDetailRequest.toObject = function toObject(message, options) { + ListVodAdTagDetailsRequest.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.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; return object; }; /** - * Converts this GetVodAdTagDetailRequest to JSON. + * Converts this ListVodAdTagDetailsRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @instance * @returns {Object.} JSON object */ - GetVodAdTagDetailRequest.prototype.toJSON = function toJSON() { + ListVodAdTagDetailsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetVodAdTagDetailRequest + * Gets the default type url for ListVodAdTagDetailsRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetVodAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListVodAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest"; }; - return GetVodAdTagDetailRequest; + return ListVodAdTagDetailsRequest; })(); - v1.ListLiveAdTagDetailsRequest = (function() { + v1.ListVodAdTagDetailsResponse = (function() { /** - * Properties of a ListLiveAdTagDetailsRequest. + * Properties of a ListVodAdTagDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @interface IListLiveAdTagDetailsRequest - * @property {string|null} [parent] ListLiveAdTagDetailsRequest parent - * @property {number|null} [pageSize] ListLiveAdTagDetailsRequest pageSize - * @property {string|null} [pageToken] ListLiveAdTagDetailsRequest pageToken + * @interface IListVodAdTagDetailsResponse + * @property {Array.|null} [vodAdTagDetails] ListVodAdTagDetailsResponse vodAdTagDetails + * @property {string|null} [nextPageToken] ListVodAdTagDetailsResponse nextPageToken */ /** - * Constructs a new ListLiveAdTagDetailsRequest. + * Constructs a new ListVodAdTagDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListLiveAdTagDetailsRequest. - * @implements IListLiveAdTagDetailsRequest + * @classdesc Represents a ListVodAdTagDetailsResponse. + * @implements IListVodAdTagDetailsResponse * @constructor - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set */ - function ListLiveAdTagDetailsRequest(properties) { + function ListVodAdTagDetailsResponse(properties) { + this.vodAdTagDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12217,103 +13261,92 @@ } /** - * ListLiveAdTagDetailsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest - * @instance - */ - ListLiveAdTagDetailsRequest.prototype.parent = ""; - - /** - * ListLiveAdTagDetailsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * ListVodAdTagDetailsResponse vodAdTagDetails. + * @member {Array.} vodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @instance */ - ListLiveAdTagDetailsRequest.prototype.pageSize = 0; + ListVodAdTagDetailsResponse.prototype.vodAdTagDetails = $util.emptyArray; /** - * ListLiveAdTagDetailsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * ListVodAdTagDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @instance */ - ListLiveAdTagDetailsRequest.prototype.pageToken = ""; + ListVodAdTagDetailsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLiveAdTagDetailsRequest instance using the specified properties. + * Creates a new ListVodAdTagDetailsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse instance */ - ListLiveAdTagDetailsRequest.create = function create(properties) { - return new ListLiveAdTagDetailsRequest(properties); + ListVodAdTagDetailsResponse.create = function create(properties) { + return new ListVodAdTagDetailsResponse(properties); }; /** - * Encodes the specified ListLiveAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * Encodes the specified ListVodAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLiveAdTagDetailsRequest.encode = function encode(message, writer) { + ListVodAdTagDetailsResponse.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.vodAdTagDetails != null && message.vodAdTagDetails.length) + for (var i = 0; i < message.vodAdTagDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.VodAdTagDetail.encode(message.vodAdTagDetails[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); return writer; }; /** - * Encodes the specified ListLiveAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * Encodes the specified ListVodAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLiveAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListVodAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer. + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLiveAdTagDetailsRequest.decode = function decode(reader, length) { + ListVodAdTagDetailsResponse.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.stitcher.v1.ListLiveAdTagDetailsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.vodAdTagDetails && message.vodAdTagDetails.length)) + message.vodAdTagDetails = []; + message.vodAdTagDetails.push($root.google.cloud.video.stitcher.v1.VodAdTagDetail.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -12325,141 +13358,148 @@ }; /** - * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLiveAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + ListVodAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLiveAdTagDetailsRequest message. + * Verifies a ListVodAdTagDetailsResponse message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLiveAdTagDetailsRequest.verify = function verify(message) { + ListVodAdTagDetailsResponse.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.vodAdTagDetails != null && message.hasOwnProperty("vodAdTagDetails")) { + if (!Array.isArray(message.vodAdTagDetails)) + return "vodAdTagDetails: array expected"; + for (var i = 0; i < message.vodAdTagDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.verify(message.vodAdTagDetails[i]); + if (error) + return "vodAdTagDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListLiveAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVodAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse */ - ListLiveAdTagDetailsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest) + ListVodAdTagDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest(); - 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); + var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse(); + if (object.vodAdTagDetails) { + if (!Array.isArray(object.vodAdTagDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: array expected"); + message.vodAdTagDetails = []; + for (var i = 0; i < object.vodAdTagDetails.length; ++i) { + if (typeof object.vodAdTagDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: object expected"); + message.vodAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.fromObject(object.vodAdTagDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListLiveAdTagDetailsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListVodAdTagDetailsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLiveAdTagDetailsRequest.toObject = function toObject(message, options) { + ListVodAdTagDetailsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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 (options.arrays || options.defaults) + object.vodAdTagDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vodAdTagDetails && message.vodAdTagDetails.length) { + object.vodAdTagDetails = []; + for (var j = 0; j < message.vodAdTagDetails.length; ++j) + object.vodAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.toObject(message.vodAdTagDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListLiveAdTagDetailsRequest to JSON. + * Converts this ListVodAdTagDetailsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @instance * @returns {Object.} JSON object */ - ListLiveAdTagDetailsRequest.prototype.toJSON = function toJSON() { + ListVodAdTagDetailsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListLiveAdTagDetailsRequest + * Gets the default type url for ListVodAdTagDetailsResponse * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListLiveAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListVodAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"; }; - return ListLiveAdTagDetailsRequest; + return ListVodAdTagDetailsResponse; })(); - v1.ListLiveAdTagDetailsResponse = (function() { + v1.GetVodAdTagDetailRequest = (function() { /** - * Properties of a ListLiveAdTagDetailsResponse. + * Properties of a GetVodAdTagDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListLiveAdTagDetailsResponse - * @property {Array.|null} [liveAdTagDetails] ListLiveAdTagDetailsResponse liveAdTagDetails - * @property {string|null} [nextPageToken] ListLiveAdTagDetailsResponse nextPageToken + * @interface IGetVodAdTagDetailRequest + * @property {string|null} [name] GetVodAdTagDetailRequest name */ /** - * Constructs a new ListLiveAdTagDetailsResponse. + * Constructs a new GetVodAdTagDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListLiveAdTagDetailsResponse. - * @implements IListLiveAdTagDetailsResponse + * @classdesc Represents a GetVodAdTagDetailRequest. + * @implements IGetVodAdTagDetailRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set */ - function ListLiveAdTagDetailsResponse(properties) { - this.liveAdTagDetails = []; + function GetVodAdTagDetailRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12467,92 +13507,75 @@ } /** - * ListLiveAdTagDetailsResponse liveAdTagDetails. - * @member {Array.} liveAdTagDetails - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse - * @instance - */ - ListLiveAdTagDetailsResponse.prototype.liveAdTagDetails = $util.emptyArray; - - /** - * ListLiveAdTagDetailsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * GetVodAdTagDetailRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @instance */ - ListLiveAdTagDetailsResponse.prototype.nextPageToken = ""; + GetVodAdTagDetailRequest.prototype.name = ""; /** - * Creates a new ListLiveAdTagDetailsResponse instance using the specified properties. + * Creates a new GetVodAdTagDetailRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse instance + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest instance */ - ListLiveAdTagDetailsResponse.create = function create(properties) { - return new ListLiveAdTagDetailsResponse(properties); + GetVodAdTagDetailRequest.create = function create(properties) { + return new GetVodAdTagDetailRequest(properties); }; /** - * Encodes the specified ListLiveAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLiveAdTagDetailsResponse.encode = function encode(message, writer) { + GetVodAdTagDetailRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.liveAdTagDetails != null && message.liveAdTagDetails.length) - for (var i = 0; i < message.liveAdTagDetails.length; ++i) - $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.encode(message.liveAdTagDetails[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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListLiveAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * Encodes the specified GetVodAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLiveAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVodAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer. + * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLiveAdTagDetailsResponse.decode = function decode(reader, length) { + GetVodAdTagDetailRequest.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.stitcher.v1.ListLiveAdTagDetailsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.liveAdTagDetails && message.liveAdTagDetails.length)) - message.liveAdTagDetails = []; - message.liveAdTagDetails.push($root.google.cloud.video.stitcher.v1.LiveAdTagDetail.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -12564,148 +13587,124 @@ }; /** - * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLiveAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + GetVodAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLiveAdTagDetailsResponse message. + * Verifies a GetVodAdTagDetailRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLiveAdTagDetailsResponse.verify = function verify(message) { + GetVodAdTagDetailRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.liveAdTagDetails != null && message.hasOwnProperty("liveAdTagDetails")) { - if (!Array.isArray(message.liveAdTagDetails)) - return "liveAdTagDetails: array expected"; - for (var i = 0; i < message.liveAdTagDetails.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.verify(message.liveAdTagDetails[i]); - if (error) - return "liveAdTagDetails." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListLiveAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVodAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest */ - ListLiveAdTagDetailsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse) + GetVodAdTagDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse(); - if (object.liveAdTagDetails) { - if (!Array.isArray(object.liveAdTagDetails)) - throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: array expected"); - message.liveAdTagDetails = []; - for (var i = 0; i < object.liveAdTagDetails.length; ++i) { - if (typeof object.liveAdTagDetails[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: object expected"); - message.liveAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.fromObject(object.liveAdTagDetails[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListLiveAdTagDetailsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVodAdTagDetailRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse + * @param {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} message GetVodAdTagDetailRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLiveAdTagDetailsResponse.toObject = function toObject(message, options) { + GetVodAdTagDetailRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.liveAdTagDetails = []; if (options.defaults) - object.nextPageToken = ""; - if (message.liveAdTagDetails && message.liveAdTagDetails.length) { - object.liveAdTagDetails = []; - for (var j = 0; j < message.liveAdTagDetails.length; ++j) - object.liveAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.toObject(message.liveAdTagDetails[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListLiveAdTagDetailsResponse to JSON. + * Converts this GetVodAdTagDetailRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @instance * @returns {Object.} JSON object */ - ListLiveAdTagDetailsResponse.prototype.toJSON = function toJSON() { + GetVodAdTagDetailRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListLiveAdTagDetailsResponse + * Gets the default type url for GetVodAdTagDetailRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListLiveAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetVodAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest"; }; - return ListLiveAdTagDetailsResponse; + return GetVodAdTagDetailRequest; })(); - v1.GetLiveAdTagDetailRequest = (function() { + v1.ListLiveAdTagDetailsRequest = (function() { /** - * Properties of a GetLiveAdTagDetailRequest. + * Properties of a ListLiveAdTagDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetLiveAdTagDetailRequest - * @property {string|null} [name] GetLiveAdTagDetailRequest name + * @interface IListLiveAdTagDetailsRequest + * @property {string|null} [parent] ListLiveAdTagDetailsRequest parent + * @property {number|null} [pageSize] ListLiveAdTagDetailsRequest pageSize + * @property {string|null} [pageToken] ListLiveAdTagDetailsRequest pageToken */ /** - * Constructs a new GetLiveAdTagDetailRequest. + * Constructs a new ListLiveAdTagDetailsRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetLiveAdTagDetailRequest. - * @implements IGetLiveAdTagDetailRequest + * @classdesc Represents a ListLiveAdTagDetailsRequest. + * @implements IListLiveAdTagDetailsRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set */ - function GetLiveAdTagDetailRequest(properties) { + function ListLiveAdTagDetailsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12713,75 +13712,103 @@ } /** - * GetLiveAdTagDetailRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * ListLiveAdTagDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @instance */ - GetLiveAdTagDetailRequest.prototype.name = ""; + ListLiveAdTagDetailsRequest.prototype.parent = ""; /** - * Creates a new GetLiveAdTagDetailRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest - * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest instance + * ListLiveAdTagDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance */ - GetLiveAdTagDetailRequest.create = function create(properties) { - return new GetLiveAdTagDetailRequest(properties); - }; + ListLiveAdTagDetailsRequest.prototype.pageSize = 0; /** - * Encodes the specified GetLiveAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * ListLiveAdTagDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance + */ + ListLiveAdTagDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLiveAdTagDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest instance + */ + ListLiveAdTagDetailsRequest.create = function create(properties) { + return new ListLiveAdTagDetailsRequest(properties); + }; + + /** + * Encodes the specified ListLiveAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLiveAdTagDetailRequest.encode = function encode(message, writer) { + ListLiveAdTagDetailsRequest.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.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); return writer; }; /** - * Encodes the specified GetLiveAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * Encodes the specified ListLiveAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLiveAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLiveAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer. + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLiveAdTagDetailRequest.decode = function decode(reader, length) { + ListLiveAdTagDetailsRequest.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.stitcher.v1.GetLiveAdTagDetailRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest(); 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.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -12793,124 +13820,141 @@ }; /** - * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLiveAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { + ListLiveAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLiveAdTagDetailRequest message. + * Verifies a ListLiveAdTagDetailsRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLiveAdTagDetailRequest.verify = function verify(message) { + ListLiveAdTagDetailsRequest.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.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"; return null; }; /** - * Creates a GetLiveAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLiveAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest */ - GetLiveAdTagDetailRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest) + ListLiveAdTagDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest(); + 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); return message; }; /** - * Creates a plain object from a GetLiveAdTagDetailRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLiveAdTagDetailsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static - * @param {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLiveAdTagDetailRequest.toObject = function toObject(message, options) { + ListLiveAdTagDetailsRequest.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.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; return object; }; /** - * Converts this GetLiveAdTagDetailRequest to JSON. + * Converts this ListLiveAdTagDetailsRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @instance * @returns {Object.} JSON object */ - GetLiveAdTagDetailRequest.prototype.toJSON = function toJSON() { + ListLiveAdTagDetailsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetLiveAdTagDetailRequest + * Gets the default type url for ListLiveAdTagDetailsRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetLiveAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLiveAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest"; }; - return GetLiveAdTagDetailRequest; + return ListLiveAdTagDetailsRequest; })(); - v1.CreateSlateRequest = (function() { + v1.ListLiveAdTagDetailsResponse = (function() { /** - * Properties of a CreateSlateRequest. + * Properties of a ListLiveAdTagDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @interface ICreateSlateRequest - * @property {string|null} [parent] CreateSlateRequest parent - * @property {string|null} [slateId] CreateSlateRequest slateId - * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] CreateSlateRequest slate + * @interface IListLiveAdTagDetailsResponse + * @property {Array.|null} [liveAdTagDetails] ListLiveAdTagDetailsResponse liveAdTagDetails + * @property {string|null} [nextPageToken] ListLiveAdTagDetailsResponse nextPageToken */ /** - * Constructs a new CreateSlateRequest. + * Constructs a new ListLiveAdTagDetailsResponse. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a CreateSlateRequest. - * @implements ICreateSlateRequest + * @classdesc Represents a ListLiveAdTagDetailsResponse. + * @implements IListLiveAdTagDetailsResponse * @constructor - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set */ - function CreateSlateRequest(properties) { + function ListLiveAdTagDetailsResponse(properties) { + this.liveAdTagDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12918,103 +13962,92 @@ } /** - * CreateSlateRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest - * @instance - */ - CreateSlateRequest.prototype.parent = ""; - - /** - * CreateSlateRequest slateId. - * @member {string} slateId - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * ListLiveAdTagDetailsResponse liveAdTagDetails. + * @member {Array.} liveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @instance */ - CreateSlateRequest.prototype.slateId = ""; + ListLiveAdTagDetailsResponse.prototype.liveAdTagDetails = $util.emptyArray; /** - * CreateSlateRequest slate. - * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * ListLiveAdTagDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @instance */ - CreateSlateRequest.prototype.slate = null; + ListLiveAdTagDetailsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateSlateRequest instance using the specified properties. + * Creates a new ListLiveAdTagDetailsResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest instance + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse instance */ - CreateSlateRequest.create = function create(properties) { - return new CreateSlateRequest(properties); + ListLiveAdTagDetailsResponse.create = function create(properties) { + return new ListLiveAdTagDetailsResponse(properties); }; /** - * Encodes the specified CreateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * Encodes the specified ListLiveAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSlateRequest.encode = function encode(message, writer) { + ListLiveAdTagDetailsResponse.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.slateId != null && Object.hasOwnProperty.call(message, "slateId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.slateId); - if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) - $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.liveAdTagDetails != null && message.liveAdTagDetails.length) + for (var i = 0; i < message.liveAdTagDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.encode(message.liveAdTagDetails[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); return writer; }; /** - * Encodes the specified CreateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * Encodes the specified ListLiveAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLiveAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSlateRequest message from the specified reader or buffer. + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSlateRequest.decode = function decode(reader, length) { + ListLiveAdTagDetailsResponse.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.stitcher.v1.CreateSlateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.liveAdTagDetails && message.liveAdTagDetails.length)) + message.liveAdTagDetails = []; + message.liveAdTagDetails.push($root.google.cloud.video.stitcher.v1.LiveAdTagDetail.decode(reader, reader.uint32())); break; } case 2: { - message.slateId = reader.string(); - break; - } - case 3: { - message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -13026,144 +14059,148 @@ }; /** - * Decodes a CreateSlateRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSlateRequest.decodeDelimited = function decodeDelimited(reader) { + ListLiveAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSlateRequest message. + * Verifies a ListLiveAdTagDetailsResponse message. * @function verify - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSlateRequest.verify = function verify(message) { + ListLiveAdTagDetailsResponse.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.slateId != null && message.hasOwnProperty("slateId")) - if (!$util.isString(message.slateId)) - return "slateId: string expected"; - if (message.slate != null && message.hasOwnProperty("slate")) { - var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); - if (error) - return "slate." + error; + if (message.liveAdTagDetails != null && message.hasOwnProperty("liveAdTagDetails")) { + if (!Array.isArray(message.liveAdTagDetails)) + return "liveAdTagDetails: array expected"; + for (var i = 0; i < message.liveAdTagDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.verify(message.liveAdTagDetails[i]); + if (error) + return "liveAdTagDetails." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateSlateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLiveAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse */ - CreateSlateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.CreateSlateRequest) + ListLiveAdTagDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse) return object; - var message = new $root.google.cloud.video.stitcher.v1.CreateSlateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.slateId != null) - message.slateId = String(object.slateId); - if (object.slate != null) { - if (typeof object.slate !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.CreateSlateRequest.slate: object expected"); - message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); + var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse(); + if (object.liveAdTagDetails) { + if (!Array.isArray(object.liveAdTagDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: array expected"); + message.liveAdTagDetails = []; + for (var i = 0; i < object.liveAdTagDetails.length; ++i) { + if (typeof object.liveAdTagDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: object expected"); + message.liveAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.fromObject(object.liveAdTagDetails[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateSlateRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLiveAdTagDetailsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static - * @param {google.cloud.video.stitcher.v1.CreateSlateRequest} message CreateSlateRequest + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSlateRequest.toObject = function toObject(message, options) { + ListLiveAdTagDetailsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.slateId = ""; - object.slate = null; + if (options.arrays || options.defaults) + object.liveAdTagDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.liveAdTagDetails && message.liveAdTagDetails.length) { + object.liveAdTagDetails = []; + for (var j = 0; j < message.liveAdTagDetails.length; ++j) + object.liveAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.toObject(message.liveAdTagDetails[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.slateId != null && message.hasOwnProperty("slateId")) - object.slateId = message.slateId; - if (message.slate != null && message.hasOwnProperty("slate")) - object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateSlateRequest to JSON. + * Converts this ListLiveAdTagDetailsResponse to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @instance * @returns {Object.} JSON object */ - CreateSlateRequest.prototype.toJSON = function toJSON() { + ListLiveAdTagDetailsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSlateRequest + * Gets the default type url for ListLiveAdTagDetailsResponse * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLiveAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateSlateRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"; }; - return CreateSlateRequest; + return ListLiveAdTagDetailsResponse; })(); - v1.GetSlateRequest = (function() { + v1.GetLiveAdTagDetailRequest = (function() { /** - * Properties of a GetSlateRequest. + * Properties of a GetLiveAdTagDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetSlateRequest - * @property {string|null} [name] GetSlateRequest name + * @interface IGetLiveAdTagDetailRequest + * @property {string|null} [name] GetLiveAdTagDetailRequest name */ /** - * Constructs a new GetSlateRequest. + * Constructs a new GetLiveAdTagDetailRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetSlateRequest. - * @implements IGetSlateRequest + * @classdesc Represents a GetLiveAdTagDetailRequest. + * @implements IGetLiveAdTagDetailRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set */ - function GetSlateRequest(properties) { + function GetLiveAdTagDetailRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13171,35 +14208,35 @@ } /** - * GetSlateRequest name. + * GetLiveAdTagDetailRequest name. * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @instance */ - GetSlateRequest.prototype.name = ""; + GetLiveAdTagDetailRequest.prototype.name = ""; /** - * Creates a new GetSlateRequest instance using the specified properties. + * Creates a new GetLiveAdTagDetailRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest instance + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest instance */ - GetSlateRequest.create = function create(properties) { - return new GetSlateRequest(properties); + GetLiveAdTagDetailRequest.create = function create(properties) { + return new GetLiveAdTagDetailRequest(properties); }; /** - * Encodes the specified GetSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * Encodes the specified GetLiveAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSlateRequest.encode = function encode(message, writer) { + GetLiveAdTagDetailRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -13208,33 +14245,33 @@ }; /** - * Encodes the specified GetSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * Encodes the specified GetLiveAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetLiveAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSlateRequest message from the specified reader or buffer. + * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSlateRequest.decode = function decode(reader, length) { + GetLiveAdTagDetailRequest.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.stitcher.v1.GetSlateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -13251,30 +14288,30 @@ }; /** - * Decodes a GetSlateRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSlateRequest.decodeDelimited = function decodeDelimited(reader) { + GetLiveAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSlateRequest message. + * Verifies a GetLiveAdTagDetailRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSlateRequest.verify = function verify(message) { + GetLiveAdTagDetailRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -13284,32 +14321,32 @@ }; /** - * Creates a GetSlateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLiveAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest */ - GetSlateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetSlateRequest) + GetLiveAdTagDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetSlateRequest(); + var message = new $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetSlateRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetLiveAdTagDetailRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static - * @param {google.cloud.video.stitcher.v1.GetSlateRequest} message GetSlateRequest + * @param {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSlateRequest.toObject = function toObject(message, options) { + GetLiveAdTagDetailRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -13321,56 +14358,55 @@ }; /** - * Converts this GetSlateRequest to JSON. + * Converts this GetLiveAdTagDetailRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @instance * @returns {Object.} JSON object */ - GetSlateRequest.prototype.toJSON = function toJSON() { + GetLiveAdTagDetailRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSlateRequest + * Gets the default type url for GetLiveAdTagDetailRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetLiveAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetSlateRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest"; }; - return GetSlateRequest; + return GetLiveAdTagDetailRequest; })(); - v1.ListSlatesRequest = (function() { + v1.CreateSlateRequest = (function() { /** - * Properties of a ListSlatesRequest. + * Properties of a CreateSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListSlatesRequest - * @property {string|null} [parent] ListSlatesRequest parent - * @property {number|null} [pageSize] ListSlatesRequest pageSize - * @property {string|null} [pageToken] ListSlatesRequest pageToken - * @property {string|null} [filter] ListSlatesRequest filter - * @property {string|null} [orderBy] ListSlatesRequest orderBy + * @interface ICreateSlateRequest + * @property {string|null} [parent] CreateSlateRequest parent + * @property {string|null} [slateId] CreateSlateRequest slateId + * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] CreateSlateRequest slate + * @property {string|null} [requestId] CreateSlateRequest requestId */ /** - * Constructs a new ListSlatesRequest. + * Constructs a new CreateSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListSlatesRequest. - * @implements IListSlatesRequest + * @classdesc Represents a CreateSlateRequest. + * @implements ICreateSlateRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set */ - function ListSlatesRequest(properties) { + function CreateSlateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13378,110 +14414,100 @@ } /** - * ListSlatesRequest parent. + * CreateSlateRequest parent. * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @instance */ - ListSlatesRequest.prototype.parent = ""; + CreateSlateRequest.prototype.parent = ""; /** - * ListSlatesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * CreateSlateRequest slateId. + * @member {string} slateId + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @instance */ - ListSlatesRequest.prototype.pageSize = 0; - - /** - * ListSlatesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest - * @instance - */ - ListSlatesRequest.prototype.pageToken = ""; + CreateSlateRequest.prototype.slateId = ""; /** - * ListSlatesRequest filter. - * @member {string} filter - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * CreateSlateRequest slate. + * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @instance */ - ListSlatesRequest.prototype.filter = ""; + CreateSlateRequest.prototype.slate = null; /** - * ListSlatesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * CreateSlateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @instance */ - ListSlatesRequest.prototype.orderBy = ""; + CreateSlateRequest.prototype.requestId = ""; /** - * Creates a new ListSlatesRequest instance using the specified properties. + * Creates a new CreateSlateRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest instance + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest instance */ - ListSlatesRequest.create = function create(properties) { - return new ListSlatesRequest(properties); + CreateSlateRequest.create = function create(properties) { + return new CreateSlateRequest(properties); }; /** - * Encodes the specified ListSlatesRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * Encodes the specified CreateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSlatesRequest.encode = function encode(message, writer) { + CreateSlateRequest.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.slateId != null && Object.hasOwnProperty.call(message, "slateId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.slateId); + if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified ListSlatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * Encodes the specified CreateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSlatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSlatesRequest message from the specified reader or buffer. + * Decodes a CreateSlateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSlatesRequest.decode = function decode(reader, length) { + CreateSlateRequest.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.stitcher.v1.ListSlatesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateSlateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -13490,19 +14516,15 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.slateId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.requestId = reader.string(); break; } default: @@ -13514,159 +14536,152 @@ }; /** - * Decodes a ListSlatesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSlateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSlatesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateSlateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSlatesRequest message. + * Verifies a CreateSlateRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSlatesRequest.verify = function verify(message) { + CreateSlateRequest.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.slateId != null && message.hasOwnProperty("slateId")) + if (!$util.isString(message.slateId)) + return "slateId: string expected"; + if (message.slate != null && message.hasOwnProperty("slate")) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); + if (error) + return "slate." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ListSlatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSlateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest */ - ListSlatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesRequest) + CreateSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateSlateRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListSlatesRequest(); + var message = new $root.google.cloud.video.stitcher.v1.CreateSlateRequest(); 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); + if (object.slateId != null) + message.slateId = String(object.slateId); + if (object.slate != null) { + if (typeof object.slate !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateSlateRequest.slate: object expected"); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ListSlatesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateSlateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.ListSlatesRequest} message ListSlatesRequest + * @param {google.cloud.video.stitcher.v1.CreateSlateRequest} message CreateSlateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSlatesRequest.toObject = function toObject(message, options) { + CreateSlateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.slateId = ""; + object.slate = null; + object.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; + if (message.slateId != null && message.hasOwnProperty("slateId")) + object.slateId = message.slateId; + if (message.slate != null && message.hasOwnProperty("slate")) + object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ListSlatesRequest to JSON. + * Converts this CreateSlateRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @instance * @returns {Object.} JSON object */ - ListSlatesRequest.prototype.toJSON = function toJSON() { + CreateSlateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSlatesRequest + * Gets the default type url for CreateSlateRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSlatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateSlateRequest"; }; - return ListSlatesRequest; + return CreateSlateRequest; })(); - v1.ListSlatesResponse = (function() { + v1.GetSlateRequest = (function() { /** - * Properties of a ListSlatesResponse. + * Properties of a GetSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IListSlatesResponse - * @property {Array.|null} [slates] ListSlatesResponse slates - * @property {string|null} [nextPageToken] ListSlatesResponse nextPageToken - * @property {Array.|null} [unreachable] ListSlatesResponse unreachable + * @interface IGetSlateRequest + * @property {string|null} [name] GetSlateRequest name */ /** - * Constructs a new ListSlatesResponse. + * Constructs a new GetSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a ListSlatesResponse. - * @implements IListSlatesResponse + * @classdesc Represents a GetSlateRequest. + * @implements IGetSlateRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set */ - function ListSlatesResponse(properties) { - this.slates = []; - this.unreachable = []; + function GetSlateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13674,109 +14689,75 @@ } /** - * ListSlatesResponse slates. - * @member {Array.} slates - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse - * @instance - */ - ListSlatesResponse.prototype.slates = $util.emptyArray; - - /** - * ListSlatesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse - * @instance - */ - ListSlatesResponse.prototype.nextPageToken = ""; - - /** - * ListSlatesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * GetSlateRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @instance */ - ListSlatesResponse.prototype.unreachable = $util.emptyArray; + GetSlateRequest.prototype.name = ""; /** - * Creates a new ListSlatesResponse instance using the specified properties. + * Creates a new GetSlateRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse instance + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest instance */ - ListSlatesResponse.create = function create(properties) { - return new ListSlatesResponse(properties); + GetSlateRequest.create = function create(properties) { + return new GetSlateRequest(properties); }; /** - * Encodes the specified ListSlatesResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * Encodes the specified GetSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSlatesResponse.encode = function encode(message, writer) { + GetSlateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.slates != null && message.slates.length) - for (var i = 0; i < message.slates.length; ++i) - $root.google.cloud.video.stitcher.v1.Slate.encode(message.slates[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); return writer; }; /** - * Encodes the specified ListSlatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * Encodes the specified GetSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSlatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSlatesResponse message from the specified reader or buffer. + * Decodes a GetSlateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSlatesResponse.decode = function decode(reader, length) { + GetSlateRequest.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.stitcher.v1.ListSlatesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetSlateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.slates && message.slates.length)) - message.slates = []; - message.slates.push($root.google.cloud.video.stitcher.v1.Slate.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()); + message.name = reader.string(); break; } default: @@ -13788,170 +14769,126 @@ }; /** - * Decodes a ListSlatesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSlateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSlatesResponse.decodeDelimited = function decodeDelimited(reader) { + GetSlateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSlatesResponse message. + * Verifies a GetSlateRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSlatesResponse.verify = function verify(message) { + GetSlateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.slates != null && message.hasOwnProperty("slates")) { - if (!Array.isArray(message.slates)) - return "slates: array expected"; - for (var i = 0; i < message.slates.length; ++i) { - var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slates[i]); - if (error) - return "slates." + 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"; return null; }; /** - * Creates a ListSlatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSlateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest */ - ListSlatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesResponse) + GetSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetSlateRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.ListSlatesResponse(); - if (object.slates) { - if (!Array.isArray(object.slates)) - throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: array expected"); - message.slates = []; - for (var i = 0; i < object.slates.length; ++i) { - if (typeof object.slates[i] !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: object expected"); - message.slates[i] = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slates[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.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.stitcher.v1.GetSlateRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSlatesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSlateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} message ListSlatesResponse + * @param {google.cloud.video.stitcher.v1.GetSlateRequest} message GetSlateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSlatesResponse.toObject = function toObject(message, options) { + GetSlateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.slates = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.slates && message.slates.length) { - object.slates = []; - for (var j = 0; j < message.slates.length; ++j) - object.slates[j] = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slates[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]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSlatesResponse to JSON. + * Converts this GetSlateRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @instance * @returns {Object.} JSON object */ - ListSlatesResponse.prototype.toJSON = function toJSON() { + GetSlateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSlatesResponse + * Gets the default type url for GetSlateRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSlatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesResponse"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetSlateRequest"; }; - return ListSlatesResponse; + return GetSlateRequest; })(); - v1.UpdateSlateRequest = (function() { + v1.ListSlatesRequest = (function() { /** - * Properties of an UpdateSlateRequest. + * Properties of a ListSlatesRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IUpdateSlateRequest - * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] UpdateSlateRequest slate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSlateRequest updateMask + * @interface IListSlatesRequest + * @property {string|null} [parent] ListSlatesRequest parent + * @property {number|null} [pageSize] ListSlatesRequest pageSize + * @property {string|null} [pageToken] ListSlatesRequest pageToken + * @property {string|null} [filter] ListSlatesRequest filter + * @property {string|null} [orderBy] ListSlatesRequest orderBy */ /** - * Constructs a new UpdateSlateRequest. + * Constructs a new ListSlatesRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents an UpdateSlateRequest. - * @implements IUpdateSlateRequest + * @classdesc Represents a ListSlatesRequest. + * @implements IListSlatesRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set */ - function UpdateSlateRequest(properties) { + function ListSlatesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13959,89 +14896,131 @@ } /** - * UpdateSlateRequest slate. - * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * ListSlatesRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @instance */ - UpdateSlateRequest.prototype.slate = null; + ListSlatesRequest.prototype.parent = ""; /** - * UpdateSlateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * ListSlatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @instance */ - UpdateSlateRequest.prototype.updateMask = null; + ListSlatesRequest.prototype.pageSize = 0; /** - * Creates a new UpdateSlateRequest instance using the specified properties. + * ListSlatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.pageToken = ""; + + /** + * ListSlatesRequest filter. + * @member {string} filter + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.filter = ""; + + /** + * ListSlatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListSlatesRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest instance + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest instance */ - UpdateSlateRequest.create = function create(properties) { - return new UpdateSlateRequest(properties); + ListSlatesRequest.create = function create(properties) { + return new ListSlatesRequest(properties); }; /** - * Encodes the specified UpdateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * Encodes the specified ListSlatesRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSlateRequest.encode = function encode(message, writer) { + ListSlatesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) - $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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 UpdateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * Encodes the specified ListSlatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static - * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSlatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSlateRequest message from the specified reader or buffer. + * Decodes a ListSlatesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSlateRequest.decode = function decode(reader, length) { + ListSlatesRequest.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.stitcher.v1.UpdateSlateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListSlatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + 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: @@ -14053,141 +15032,159 @@ }; /** - * Decodes an UpdateSlateRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSlatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSlateRequest.decodeDelimited = function decodeDelimited(reader) { + ListSlatesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSlateRequest message. + * Verifies a ListSlatesRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSlateRequest.verify = function verify(message) { + ListSlatesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.slate != null && message.hasOwnProperty("slate")) { - var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); - if (error) - return "slate." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + 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 UpdateSlateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSlatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest */ - UpdateSlateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateSlateRequest) + ListSlatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.UpdateSlateRequest(); - if (object.slate != null) { - if (typeof object.slate !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.slate: object expected"); - message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.video.stitcher.v1.ListSlatesRequest(); + 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 UpdateSlateRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSlatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static - * @param {google.cloud.video.stitcher.v1.UpdateSlateRequest} message UpdateSlateRequest + * @param {google.cloud.video.stitcher.v1.ListSlatesRequest} message ListSlatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSlateRequest.toObject = function toObject(message, options) { + ListSlatesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.slate = null; - object.updateMask = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.slate != null && message.hasOwnProperty("slate")) - object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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 UpdateSlateRequest to JSON. + * Converts this ListSlatesRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @instance * @returns {Object.} JSON object */ - UpdateSlateRequest.prototype.toJSON = function toJSON() { + ListSlatesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSlateRequest + * Gets the default type url for ListSlatesRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSlatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateSlateRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesRequest"; }; - return UpdateSlateRequest; + return ListSlatesRequest; })(); - v1.DeleteSlateRequest = (function() { + v1.ListSlatesResponse = (function() { /** - * Properties of a DeleteSlateRequest. + * Properties of a ListSlatesResponse. * @memberof google.cloud.video.stitcher.v1 - * @interface IDeleteSlateRequest - * @property {string|null} [name] DeleteSlateRequest name + * @interface IListSlatesResponse + * @property {Array.|null} [slates] ListSlatesResponse slates + * @property {string|null} [nextPageToken] ListSlatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListSlatesResponse unreachable */ /** - * Constructs a new DeleteSlateRequest. + * Constructs a new ListSlatesResponse. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a DeleteSlateRequest. - * @implements IDeleteSlateRequest + * @classdesc Represents a ListSlatesResponse. + * @implements IListSlatesResponse * @constructor - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set */ - function DeleteSlateRequest(properties) { + function ListSlatesResponse(properties) { + this.slates = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14195,75 +15192,109 @@ } /** - * DeleteSlateRequest name. - * @member {string} name - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * ListSlatesResponse slates. + * @member {Array.} slates + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @instance */ - DeleteSlateRequest.prototype.name = ""; + ListSlatesResponse.prototype.slates = $util.emptyArray; /** - * Creates a new DeleteSlateRequest instance using the specified properties. + * ListSlatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + */ + ListSlatesResponse.prototype.nextPageToken = ""; + + /** + * ListSlatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + */ + ListSlatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListSlatesResponse instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest instance + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse instance */ - DeleteSlateRequest.create = function create(properties) { - return new DeleteSlateRequest(properties); + ListSlatesResponse.create = function create(properties) { + return new ListSlatesResponse(properties); }; /** - * Encodes the specified DeleteSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * Encodes the specified ListSlatesResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSlateRequest.encode = function encode(message, writer) { + ListSlatesResponse.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.slates != null && message.slates.length) + for (var i = 0; i < message.slates.length; ++i) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slates[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 DeleteSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * Encodes the specified ListSlatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static - * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSlatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSlateRequest message from the specified reader or buffer. + * Decodes a ListSlatesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSlateRequest.decode = function decode(reader, length) { + ListSlatesResponse.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.stitcher.v1.DeleteSlateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListSlatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.slates && message.slates.length)) + message.slates = []; + message.slates.push($root.google.cloud.video.stitcher.v1.Slate.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: @@ -14275,123 +15306,170 @@ }; /** - * Decodes a DeleteSlateRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSlatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSlateRequest.decodeDelimited = function decodeDelimited(reader) { + ListSlatesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSlateRequest message. + * Verifies a ListSlatesResponse message. * @function verify - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSlateRequest.verify = function verify(message) { + ListSlatesResponse.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.slates != null && message.hasOwnProperty("slates")) { + if (!Array.isArray(message.slates)) + return "slates: array expected"; + for (var i = 0; i < message.slates.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slates[i]); + if (error) + return "slates." + 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; }; /** - * Creates a DeleteSlateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSlatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse */ - DeleteSlateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteSlateRequest) + ListSlatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesResponse) return object; - var message = new $root.google.cloud.video.stitcher.v1.DeleteSlateRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.video.stitcher.v1.ListSlatesResponse(); + if (object.slates) { + if (!Array.isArray(object.slates)) + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: array expected"); + message.slates = []; + for (var i = 0; i < object.slates.length; ++i) { + if (typeof object.slates[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: object expected"); + message.slates[i] = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteSlateRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSlatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static - * @param {google.cloud.video.stitcher.v1.DeleteSlateRequest} message DeleteSlateRequest + * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} message ListSlatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSlateRequest.toObject = function toObject(message, options) { + ListSlatesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.slates = []; + object.unreachable = []; + } if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.slates && message.slates.length) { + object.slates = []; + for (var j = 0; j < message.slates.length; ++j) + object.slates[j] = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slates[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; }; /** - * Converts this DeleteSlateRequest to JSON. + * Converts this ListSlatesResponse to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @instance * @returns {Object.} JSON object */ - DeleteSlateRequest.prototype.toJSON = function toJSON() { + ListSlatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSlateRequest + * Gets the default type url for ListSlatesResponse * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSlatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteSlateRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesResponse"; }; - return DeleteSlateRequest; + return ListSlatesResponse; })(); - v1.CreateLiveSessionRequest = (function() { + v1.UpdateSlateRequest = (function() { /** - * Properties of a CreateLiveSessionRequest. + * Properties of an UpdateSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface ICreateLiveSessionRequest - * @property {string|null} [parent] CreateLiveSessionRequest parent - * @property {google.cloud.video.stitcher.v1.ILiveSession|null} [liveSession] CreateLiveSessionRequest liveSession + * @interface IUpdateSlateRequest + * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] UpdateSlateRequest slate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSlateRequest updateMask */ /** - * Constructs a new CreateLiveSessionRequest. + * Constructs a new UpdateSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a CreateLiveSessionRequest. - * @implements ICreateLiveSessionRequest + * @classdesc Represents an UpdateSlateRequest. + * @implements IUpdateSlateRequest * @constructor - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set */ - function CreateLiveSessionRequest(properties) { + function UpdateSlateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14399,89 +15477,89 @@ } /** - * CreateLiveSessionRequest parent. - * @member {string} parent - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * UpdateSlateRequest slate. + * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @instance */ - CreateLiveSessionRequest.prototype.parent = ""; + UpdateSlateRequest.prototype.slate = null; /** - * CreateLiveSessionRequest liveSession. - * @member {google.cloud.video.stitcher.v1.ILiveSession|null|undefined} liveSession - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * UpdateSlateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @instance */ - CreateLiveSessionRequest.prototype.liveSession = null; + UpdateSlateRequest.prototype.updateMask = null; /** - * Creates a new CreateLiveSessionRequest instance using the specified properties. + * Creates a new UpdateSlateRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest instance + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest instance */ - CreateLiveSessionRequest.create = function create(properties) { - return new CreateLiveSessionRequest(properties); + UpdateSlateRequest.create = function create(properties) { + return new UpdateSlateRequest(properties); }; /** - * Encodes the specified CreateLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * Encodes the specified UpdateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLiveSessionRequest.encode = function encode(message, writer) { + UpdateSlateRequest.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.liveSession != null && Object.hasOwnProperty.call(message, "liveSession")) - $root.google.cloud.video.stitcher.v1.LiveSession.encode(message.liveSession, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * Encodes the specified UpdateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateLiveSessionRequest message from the specified reader or buffer. + * Decodes an UpdateSlateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLiveSessionRequest.decode = function decode(reader, length) { + UpdateSlateRequest.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.stitcher.v1.CreateLiveSessionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.UpdateSlateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); break; } case 2: { - message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -14493,136 +15571,141 @@ }; /** - * Decodes a CreateLiveSessionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSlateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSlateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateLiveSessionRequest message. + * Verifies an UpdateSlateRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateLiveSessionRequest.verify = function verify(message) { + UpdateSlateRequest.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.liveSession != null && message.hasOwnProperty("liveSession")) { - var error = $root.google.cloud.video.stitcher.v1.LiveSession.verify(message.liveSession); + if (message.slate != null && message.hasOwnProperty("slate")) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); if (error) - return "liveSession." + error; + return "slate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a CreateLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSlateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest */ - CreateLiveSessionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest) + UpdateSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateSlateRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.liveSession != null) { - if (typeof object.liveSession !== "object") - throw TypeError(".google.cloud.video.stitcher.v1.CreateLiveSessionRequest.liveSession: object expected"); - message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.fromObject(object.liveSession); + var message = new $root.google.cloud.video.stitcher.v1.UpdateSlateRequest(); + if (object.slate != null) { + if (typeof object.slate !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.slate: object expected"); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a CreateLiveSessionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSlateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} message CreateLiveSessionRequest + * @param {google.cloud.video.stitcher.v1.UpdateSlateRequest} message UpdateSlateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLiveSessionRequest.toObject = function toObject(message, options) { + UpdateSlateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.liveSession = null; + object.slate = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.liveSession != null && message.hasOwnProperty("liveSession")) - object.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.toObject(message.liveSession, options); + if (message.slate != null && message.hasOwnProperty("slate")) + object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this CreateLiveSessionRequest to JSON. + * Converts this UpdateSlateRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @instance * @returns {Object.} JSON object */ - CreateLiveSessionRequest.prototype.toJSON = function toJSON() { + UpdateSlateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateLiveSessionRequest + * Gets the default type url for UpdateSlateRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateLiveSessionRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateSlateRequest"; }; - return CreateLiveSessionRequest; + return UpdateSlateRequest; })(); - v1.GetLiveSessionRequest = (function() { + v1.DeleteSlateRequest = (function() { /** - * Properties of a GetLiveSessionRequest. + * Properties of a DeleteSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @interface IGetLiveSessionRequest - * @property {string|null} [name] GetLiveSessionRequest name + * @interface IDeleteSlateRequest + * @property {string|null} [name] DeleteSlateRequest name */ /** - * Constructs a new GetLiveSessionRequest. + * Constructs a new DeleteSlateRequest. * @memberof google.cloud.video.stitcher.v1 - * @classdesc Represents a GetLiveSessionRequest. - * @implements IGetLiveSessionRequest + * @classdesc Represents a DeleteSlateRequest. + * @implements IDeleteSlateRequest * @constructor - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set */ - function GetLiveSessionRequest(properties) { + function DeleteSlateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14630,35 +15713,35 @@ } /** - * GetLiveSessionRequest name. + * DeleteSlateRequest name. * @member {string} name - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @instance */ - GetLiveSessionRequest.prototype.name = ""; + DeleteSlateRequest.prototype.name = ""; /** - * Creates a new GetLiveSessionRequest instance using the specified properties. + * Creates a new DeleteSlateRequest instance using the specified properties. * @function create - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set - * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest instance + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest instance */ - GetLiveSessionRequest.create = function create(properties) { - return new GetLiveSessionRequest(properties); + DeleteSlateRequest.create = function create(properties) { + return new DeleteSlateRequest(properties); }; /** - * Encodes the specified GetLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * Encodes the specified DeleteSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLiveSessionRequest.encode = function encode(message, writer) { + DeleteSlateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -14667,33 +15750,33 @@ }; /** - * Encodes the specified GetLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * Encodes the specified DeleteSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLiveSessionRequest message from the specified reader or buffer. + * Decodes a DeleteSlateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLiveSessionRequest.decode = function decode(reader, length) { + DeleteSlateRequest.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.stitcher.v1.GetLiveSessionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.DeleteSlateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -14710,30 +15793,30 @@ }; /** - * Decodes a GetLiveSessionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSlateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSlateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLiveSessionRequest message. + * Verifies a DeleteSlateRequest message. * @function verify - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLiveSessionRequest.verify = function verify(message) { + DeleteSlateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -14743,32 +15826,32 @@ }; /** - * Creates a GetLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSlateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest */ - GetLiveSessionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest) + DeleteSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteSlateRequest) return object; - var message = new $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest(); + var message = new $root.google.cloud.video.stitcher.v1.DeleteSlateRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetLiveSessionRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSlateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static - * @param {google.cloud.video.stitcher.v1.GetLiveSessionRequest} message GetLiveSessionRequest + * @param {google.cloud.video.stitcher.v1.DeleteSlateRequest} message DeleteSlateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLiveSessionRequest.toObject = function toObject(message, options) { + DeleteSlateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -14780,255 +15863,4262 @@ }; /** - * Converts this GetLiveSessionRequest to JSON. + * Converts this DeleteSlateRequest to JSON. * @function toJSON - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @instance * @returns {Object.} JSON object */ - GetLiveSessionRequest.prototype.toJSON = function toJSON() { + DeleteSlateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetLiveSessionRequest + * Gets the default type url for DeleteSlateRequest * @function getTypeUrl - * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveSessionRequest"; + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteSlateRequest"; }; - return GetLiveSessionRequest; + return DeleteSlateRequest; })(); - return v1; - })(); + v1.CreateLiveSessionRequest = (function() { - return stitcher; - })(); + /** + * Properties of a CreateLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateLiveSessionRequest + * @property {string|null} [parent] CreateLiveSessionRequest parent + * @property {google.cloud.video.stitcher.v1.ILiveSession|null} [liveSession] CreateLiveSessionRequest liveSession + */ - return video; - })(); + /** + * Constructs a new CreateLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateLiveSessionRequest. + * @implements ICreateLiveSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set + */ + function CreateLiveSessionRequest(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]]; + } - return cloud; - })(); + /** + * CreateLiveSessionRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + */ + CreateLiveSessionRequest.prototype.parent = ""; - google.api = (function() { + /** + * CreateLiveSessionRequest liveSession. + * @member {google.cloud.video.stitcher.v1.ILiveSession|null|undefined} liveSession + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + */ + CreateLiveSessionRequest.prototype.liveSession = null; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Creates a new CreateLiveSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest instance + */ + CreateLiveSessionRequest.create = function create(properties) { + return new CreateLiveSessionRequest(properties); + }; - api.ResourceDescriptor = (function() { + /** + * Encodes the specified CreateLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveSessionRequest.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.liveSession != null && Object.hasOwnProperty.call(message, "liveSession")) + $root.google.cloud.video.stitcher.v1.LiveSession.encode(message.liveSession, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ + /** + * Encodes the specified CreateLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - 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]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveSessionRequest.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.stitcher.v1.CreateLiveSessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Verifies a CreateLiveSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLiveSessionRequest.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.liveSession != null && message.hasOwnProperty("liveSession")) { + var error = $root.google.cloud.video.stitcher.v1.LiveSession.verify(message.liveSession); + if (error) + return "liveSession." + error; + } + return null; + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Creates a CreateLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + */ + CreateLiveSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.liveSession != null) { + if (typeof object.liveSession !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateLiveSessionRequest.liveSession: object expected"); + message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.fromObject(object.liveSession); + } + return message; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Creates a plain object from a CreateLiveSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} message CreateLiveSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLiveSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.liveSession = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.liveSession != null && message.hasOwnProperty("liveSession")) + object.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.toObject(message.liveSession, options); + return object; + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Converts this CreateLiveSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLiveSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; + /** + * Gets the default type url for CreateLiveSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateLiveSessionRequest"; + }; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; + return CreateLiveSessionRequest; + })(); - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; + v1.GetLiveSessionRequest = (function() { - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a GetLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetLiveSessionRequest + * @property {string|null} [name] GetLiveSessionRequest name + */ - /** + /** + * Constructs a new GetLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetLiveSessionRequest. + * @implements IGetLiveSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set + */ + function GetLiveSessionRequest(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]]; + } + + /** + * GetLiveSessionRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @instance + */ + GetLiveSessionRequest.prototype.name = ""; + + /** + * Creates a new GetLiveSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest instance + */ + GetLiveSessionRequest.create = function create(properties) { + return new GetLiveSessionRequest(properties); + }; + + /** + * Encodes the specified GetLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveSessionRequest.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 GetLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLiveSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveSessionRequest.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.stitcher.v1.GetLiveSessionRequest(); + 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; + }; + + /** + * Decodes a GetLiveSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLiveSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLiveSessionRequest.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 GetLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + */ + GetLiveSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLiveSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetLiveSessionRequest} message GetLiveSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLiveSessionRequest.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 GetLiveSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @instance + * @returns {Object.} JSON object + */ + GetLiveSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLiveSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveSessionRequest"; + }; + + return GetLiveSessionRequest; + })(); + + v1.CreateLiveConfigRequest = (function() { + + /** + * Properties of a CreateLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateLiveConfigRequest + * @property {string|null} [parent] CreateLiveConfigRequest parent + * @property {string|null} [liveConfigId] CreateLiveConfigRequest liveConfigId + * @property {google.cloud.video.stitcher.v1.ILiveConfig|null} [liveConfig] CreateLiveConfigRequest liveConfig + * @property {string|null} [requestId] CreateLiveConfigRequest requestId + */ + + /** + * Constructs a new CreateLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateLiveConfigRequest. + * @implements ICreateLiveConfigRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest=} [properties] Properties to set + */ + function CreateLiveConfigRequest(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]]; + } + + /** + * CreateLiveConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @instance + */ + CreateLiveConfigRequest.prototype.parent = ""; + + /** + * CreateLiveConfigRequest liveConfigId. + * @member {string} liveConfigId + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @instance + */ + CreateLiveConfigRequest.prototype.liveConfigId = ""; + + /** + * CreateLiveConfigRequest liveConfig. + * @member {google.cloud.video.stitcher.v1.ILiveConfig|null|undefined} liveConfig + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @instance + */ + CreateLiveConfigRequest.prototype.liveConfig = null; + + /** + * CreateLiveConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @instance + */ + CreateLiveConfigRequest.prototype.requestId = ""; + + /** + * Creates a new CreateLiveConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateLiveConfigRequest} CreateLiveConfigRequest instance + */ + CreateLiveConfigRequest.create = function create(properties) { + return new CreateLiveConfigRequest(properties); + }; + + /** + * Encodes the specified CreateLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest} message CreateLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveConfigRequest.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.liveConfigId != null && Object.hasOwnProperty.call(message, "liveConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.liveConfigId); + if (message.liveConfig != null && Object.hasOwnProperty.call(message, "liveConfig")) + $root.google.cloud.video.stitcher.v1.LiveConfig.encode(message.liveConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveConfigRequest} message CreateLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLiveConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateLiveConfigRequest} CreateLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveConfigRequest.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.stitcher.v1.CreateLiveConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.liveConfigId = reader.string(); + break; + } + case 3: { + message.liveConfig = $root.google.cloud.video.stitcher.v1.LiveConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLiveConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateLiveConfigRequest} CreateLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLiveConfigRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLiveConfigRequest.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.liveConfigId != null && message.hasOwnProperty("liveConfigId")) + if (!$util.isString(message.liveConfigId)) + return "liveConfigId: string expected"; + if (message.liveConfig != null && message.hasOwnProperty("liveConfig")) { + var error = $root.google.cloud.video.stitcher.v1.LiveConfig.verify(message.liveConfig); + if (error) + return "liveConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateLiveConfigRequest} CreateLiveConfigRequest + */ + CreateLiveConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateLiveConfigRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateLiveConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.liveConfigId != null) + message.liveConfigId = String(object.liveConfigId); + if (object.liveConfig != null) { + if (typeof object.liveConfig !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateLiveConfigRequest.liveConfig: object expected"); + message.liveConfig = $root.google.cloud.video.stitcher.v1.LiveConfig.fromObject(object.liveConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateLiveConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateLiveConfigRequest} message CreateLiveConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLiveConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.liveConfigId = ""; + object.liveConfig = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.liveConfigId != null && message.hasOwnProperty("liveConfigId")) + object.liveConfigId = message.liveConfigId; + if (message.liveConfig != null && message.hasOwnProperty("liveConfig")) + object.liveConfig = $root.google.cloud.video.stitcher.v1.LiveConfig.toObject(message.liveConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateLiveConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLiveConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateLiveConfigRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateLiveConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLiveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateLiveConfigRequest"; + }; + + return CreateLiveConfigRequest; + })(); + + v1.ListLiveConfigsRequest = (function() { + + /** + * Properties of a ListLiveConfigsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListLiveConfigsRequest + * @property {string|null} [parent] ListLiveConfigsRequest parent + * @property {number|null} [pageSize] ListLiveConfigsRequest pageSize + * @property {string|null} [pageToken] ListLiveConfigsRequest pageToken + * @property {string|null} [filter] ListLiveConfigsRequest filter + * @property {string|null} [orderBy] ListLiveConfigsRequest orderBy + */ + + /** + * Constructs a new ListLiveConfigsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListLiveConfigsRequest. + * @implements IListLiveConfigsRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest=} [properties] Properties to set + */ + function ListLiveConfigsRequest(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]]; + } + + /** + * ListLiveConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + */ + ListLiveConfigsRequest.prototype.parent = ""; + + /** + * ListLiveConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + */ + ListLiveConfigsRequest.prototype.pageSize = 0; + + /** + * ListLiveConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + */ + ListLiveConfigsRequest.prototype.pageToken = ""; + + /** + * ListLiveConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + */ + ListLiveConfigsRequest.prototype.filter = ""; + + /** + * ListLiveConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + */ + ListLiveConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListLiveConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsRequest} ListLiveConfigsRequest instance + */ + ListLiveConfigsRequest.create = function create(properties) { + return new ListLiveConfigsRequest(properties); + }; + + /** + * Encodes the specified ListLiveConfigsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest} message ListLiveConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveConfigsRequest.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 ListLiveConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsRequest} message ListLiveConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLiveConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsRequest} ListLiveConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveConfigsRequest.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.stitcher.v1.ListLiveConfigsRequest(); + 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; + }; + + /** + * Decodes a ListLiveConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsRequest} ListLiveConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLiveConfigsRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLiveConfigsRequest.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 ListLiveConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsRequest} ListLiveConfigsRequest + */ + ListLiveConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveConfigsRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListLiveConfigsRequest(); + 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 ListLiveConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListLiveConfigsRequest} message ListLiveConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLiveConfigsRequest.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; + }; + + /** + * Converts this ListLiveConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLiveConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLiveConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLiveConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveConfigsRequest"; + }; + + return ListLiveConfigsRequest; + })(); + + v1.ListLiveConfigsResponse = (function() { + + /** + * Properties of a ListLiveConfigsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListLiveConfigsResponse + * @property {Array.|null} [liveConfigs] ListLiveConfigsResponse liveConfigs + * @property {string|null} [nextPageToken] ListLiveConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListLiveConfigsResponse unreachable + */ + + /** + * Constructs a new ListLiveConfigsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListLiveConfigsResponse. + * @implements IListLiveConfigsResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsResponse=} [properties] Properties to set + */ + function ListLiveConfigsResponse(properties) { + this.liveConfigs = []; + 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]]; + } + + /** + * ListLiveConfigsResponse liveConfigs. + * @member {Array.} liveConfigs + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @instance + */ + ListLiveConfigsResponse.prototype.liveConfigs = $util.emptyArray; + + /** + * ListLiveConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @instance + */ + ListLiveConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListLiveConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @instance + */ + ListLiveConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListLiveConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} ListLiveConfigsResponse instance + */ + ListLiveConfigsResponse.create = function create(properties) { + return new ListLiveConfigsResponse(properties); + }; + + /** + * Encodes the specified ListLiveConfigsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsResponse} message ListLiveConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.liveConfigs != null && message.liveConfigs.length) + for (var i = 0; i < message.liveConfigs.length; ++i) + $root.google.cloud.video.stitcher.v1.LiveConfig.encode(message.liveConfigs[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 ListLiveConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveConfigsResponse} message ListLiveConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLiveConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} ListLiveConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveConfigsResponse.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.stitcher.v1.ListLiveConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.liveConfigs && message.liveConfigs.length)) + message.liveConfigs = []; + message.liveConfigs.push($root.google.cloud.video.stitcher.v1.LiveConfig.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 message; + }; + + /** + * Decodes a ListLiveConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} ListLiveConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLiveConfigsResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLiveConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.liveConfigs != null && message.hasOwnProperty("liveConfigs")) { + if (!Array.isArray(message.liveConfigs)) + return "liveConfigs: array expected"; + for (var i = 0; i < message.liveConfigs.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.LiveConfig.verify(message.liveConfigs[i]); + if (error) + return "liveConfigs." + 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; + }; + + /** + * Creates a ListLiveConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} ListLiveConfigsResponse + */ + ListLiveConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveConfigsResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListLiveConfigsResponse(); + if (object.liveConfigs) { + if (!Array.isArray(object.liveConfigs)) + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveConfigsResponse.liveConfigs: array expected"); + message.liveConfigs = []; + for (var i = 0; i < object.liveConfigs.length; ++i) { + if (typeof object.liveConfigs[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveConfigsResponse.liveConfigs: object expected"); + message.liveConfigs[i] = $root.google.cloud.video.stitcher.v1.LiveConfig.fromObject(object.liveConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveConfigsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListLiveConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListLiveConfigsResponse} message ListLiveConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLiveConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.liveConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.liveConfigs && message.liveConfigs.length) { + object.liveConfigs = []; + for (var j = 0; j < message.liveConfigs.length; ++j) + object.liveConfigs[j] = $root.google.cloud.video.stitcher.v1.LiveConfig.toObject(message.liveConfigs[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; + }; + + /** + * Converts this ListLiveConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLiveConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLiveConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListLiveConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLiveConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveConfigsResponse"; + }; + + return ListLiveConfigsResponse; + })(); + + v1.GetLiveConfigRequest = (function() { + + /** + * Properties of a GetLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetLiveConfigRequest + * @property {string|null} [name] GetLiveConfigRequest name + */ + + /** + * Constructs a new GetLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetLiveConfigRequest. + * @implements IGetLiveConfigRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest=} [properties] Properties to set + */ + function GetLiveConfigRequest(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]]; + } + + /** + * GetLiveConfigRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @instance + */ + GetLiveConfigRequest.prototype.name = ""; + + /** + * Creates a new GetLiveConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetLiveConfigRequest} GetLiveConfigRequest instance + */ + GetLiveConfigRequest.create = function create(properties) { + return new GetLiveConfigRequest(properties); + }; + + /** + * Encodes the specified GetLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest} message GetLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveConfigRequest.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 GetLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveConfigRequest} message GetLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLiveConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetLiveConfigRequest} GetLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveConfigRequest.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.stitcher.v1.GetLiveConfigRequest(); + 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; + }; + + /** + * Decodes a GetLiveConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetLiveConfigRequest} GetLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLiveConfigRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLiveConfigRequest.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 GetLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetLiveConfigRequest} GetLiveConfigRequest + */ + GetLiveConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveConfigRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetLiveConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLiveConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetLiveConfigRequest} message GetLiveConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLiveConfigRequest.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 GetLiveConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetLiveConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLiveConfigRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetLiveConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLiveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveConfigRequest"; + }; + + return GetLiveConfigRequest; + })(); + + v1.DeleteLiveConfigRequest = (function() { + + /** + * Properties of a DeleteLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IDeleteLiveConfigRequest + * @property {string|null} [name] DeleteLiveConfigRequest name + */ + + /** + * Constructs a new DeleteLiveConfigRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a DeleteLiveConfigRequest. + * @implements IDeleteLiveConfigRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest=} [properties] Properties to set + */ + function DeleteLiveConfigRequest(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]]; + } + + /** + * DeleteLiveConfigRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @instance + */ + DeleteLiveConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteLiveConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.DeleteLiveConfigRequest} DeleteLiveConfigRequest instance + */ + DeleteLiveConfigRequest.create = function create(properties) { + return new DeleteLiveConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteLiveConfigRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest} message DeleteLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLiveConfigRequest.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 DeleteLiveConfigRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest} message DeleteLiveConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLiveConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLiveConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.DeleteLiveConfigRequest} DeleteLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLiveConfigRequest.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.stitcher.v1.DeleteLiveConfigRequest(); + 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; + }; + + /** + * Decodes a DeleteLiveConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.DeleteLiveConfigRequest} DeleteLiveConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLiveConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLiveConfigRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLiveConfigRequest.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 DeleteLiveConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.DeleteLiveConfigRequest} DeleteLiveConfigRequest + */ + DeleteLiveConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteLiveConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {google.cloud.video.stitcher.v1.DeleteLiveConfigRequest} message DeleteLiveConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLiveConfigRequest.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 DeleteLiveConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLiveConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteLiveConfigRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLiveConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteLiveConfigRequest"; + }; + + return DeleteLiveConfigRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.video.stitcher.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 + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.video.stitcher.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.stitcher.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.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); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.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.stitcher.v1.OperationMetadata} OperationMetadata + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.OperationMetadata} OperationMetadata + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @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) { + 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 (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"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.video.stitcher.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.stitcher.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.stitcher.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); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {google.cloud.video.stitcher.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + } + 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; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + return stitcher; + })(); + + return video; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.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.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.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.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.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.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.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.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.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.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.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.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + FileDescriptorProto.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.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); break; } - case 3: { - message.nameField = reader.string(); + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); break; } case 4: { - message.history = reader.int32(); + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); break; } case 5: { - message.plural = reader.string(); + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); break; } case 6: { - message.singular = reader.string(); + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); break; } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); break; } default: @@ -15040,361 +20130,578 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a FileDescriptorProto message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + FileDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; } if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for FileDescriptorProto * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FileDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; }; + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); + DescriptorProto.prototype.enumType = $util.emptyArray; - api.ResourceReference = (function() { + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance */ - function ResourceReference(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]]; - } + DescriptorProto.prototype.options = null; /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto * @instance */ - ResourceReference.prototype.type = ""; + DescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto * @instance */ - ResourceReference.prototype.childType = ""; + DescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new DescriptorProto instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a DescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.DescriptorProto} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + DescriptorProto.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.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.name = reader.string(); break; } case 2: { - message.childType = reader.string(); + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; } default: @@ -15406,634 +20713,895 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.DescriptorProto} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a DescriptorProto message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + DescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + DescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (options.defaults) { + object.name = ""; + object.options = null; } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - 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]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto * @instance + * @returns {Object.} JSON object */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; }; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + DescriptorProto.ExtensionRange = (function() { - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.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.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.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.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - } - default: - reader.skipType(tag & 7); - break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); if (error) - return "rules." + error; + return "options." + error; } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; + return null; + }; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; + return ExtensionRange; + })(); - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + DescriptorProto.ReservedRange = (function() { - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; } - return typeUrlPrefix + "/google.api.Http"; - }; - return Http; - })(); + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - api.HttpRule = (function() { + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - 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 ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.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.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + return ReservedRange; + })(); - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption */ - HttpRule.prototype.responseBody = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ExtensionRangeOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + ExtensionRangeOptions.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.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -16045,255 +21613,149 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an ExtensionRangeOptions message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + ExtensionRangeOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "additionalBindings." + error; + return "uninterpretedOption." + error; } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ExtensionRangeOptions to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ExtensionRangeOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for ExtensionRangeOptions * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; }; - return HttpRule; + return ExtensionRangeOptions; })(); - api.CustomHttpPattern = (function() { + protobuf.FieldDescriptorProto = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16301,89 +21763,215 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - CustomHttpPattern.prototype.kind = ""; + FieldDescriptorProto.prototype.name = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - CustomHttpPattern.prototype.path = ""; + FieldDescriptorProto.prototype.number = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + FieldDescriptorProto.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.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); break; } case 2: { - message.path = reader.string(); + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); break; } default: @@ -16395,144 +21983,394 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this FieldDescriptorProto to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for FieldDescriptorProto * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; }; - return CustomHttpPattern; - })(); - - return api; - })(); + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); - google.protobuf = (function() { + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; + return FieldDescriptorProto; + })(); - protobuf.FileDescriptorSet = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of an OneofDescriptorProto. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ /** - * Constructs a new FileDescriptorSet. + * Constructs a new OneofDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16540,78 +22378,89 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + OneofDescriptorProto.prototype.name = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + OneofDescriptorProto.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.protobuf.FileDescriptorSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); break; } default: @@ -16623,433 +22472,284 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies an OneofDescriptorProto message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + OneofDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; } return null; }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + OneofDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + if (options.defaults) { + object.name = ""; + object.options = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {string|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - 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]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + }; /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - FileDescriptorProto.prototype.service = $util.emptyArray; + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + EnumDescriptorProto.prototype.name = ""; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FileDescriptorProto.prototype.options = null; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + EnumDescriptorProto.prototype.options = null; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FileDescriptorProto.prototype.syntax = ""; + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * FileDescriptorProto edition. - * @member {string} edition - * @memberof google.protobuf.FileDescriptorProto + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FileDescriptorProto.prototype.edition = ""; + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); return writer; }; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.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.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.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.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); break; } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); break; } - case 12: { - message.syntax = reader.string(); + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); break; } - case 13: { - message.edition = reader.string(); + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; } default: @@ -17061,352 +22761,437 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); if (error) - return "extension." + error; + return "value." + error; } } if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + var error = $root.google.protobuf.EnumOptions.verify(message.options); if (error) return "options." + error; } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - if (!$util.isString(message.edition)) - return "edition: string expected"; return null; }; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); + var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); } } if (object.options != null) { if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); } - if (object.syntax != null) - message.syntax = String(object.syntax); - if (object.edition != null) - message.edition = String(object.edition); return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; + object.value = []; + object.reservedRange = []; + object.reservedName = []; } if (options.defaults) { object.name = ""; - object["package"] = ""; object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); } if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = message.edition; return object; }; - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.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.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return FileDescriptorProto; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; })(); - protobuf.DescriptorProto = (function() { + protobuf.EnumValueDescriptorProto = (function() { /** - * Properties of a DescriptorProto. + * Properties of an EnumValueDescriptorProto. * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options */ /** - * Constructs a new DescriptorProto. + * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function EnumValueDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17414,168 +23199,90 @@ } /** - * DescriptorProto name. + * EnumValueDescriptorProto name. * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - DescriptorProto.prototype.options = null; + EnumValueDescriptorProto.prototype.name = ""; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + EnumValueDescriptorProto.prototype.number = 0; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + EnumValueDescriptorProto.prototype.options = null; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.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.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.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.protobuf.DescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17584,55 +23291,11 @@ break; } case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.number = reader.int32(); break; } case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); break; } default: @@ -17644,816 +23307,768 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies an EnumValueDescriptorProto message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.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.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } return null; }; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - var message = new $root.google.protobuf.DescriptorProto(); + var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } + if (object.number != null) + message.number = object.number | 0; if (object.options != null) { if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } if (options.defaults) { object.name = ""; + object.number = 0; object.options = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for EnumValueDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; }; - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ + return EnumValueDescriptorProto; + })(); - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } + protobuf.ServiceDescriptorProto = (function() { - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.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.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.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.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); if (error) - return "options." + error; + return "method." + error; } - return null; - }; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); } - return message; - }; + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; + return ServiceDescriptorProto; + })(); - return ExtensionRange; - })(); + protobuf.MethodDescriptorProto = (function() { - DescriptorProto.ReservedRange = (function() { + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; - } + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.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.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.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.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; - }; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ReservedRange; - })(); + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; - return DescriptorProto; + return MethodDescriptorProto; })(); - protobuf.ExtensionRangeOptions = (function() { + protobuf.FileOptions = (function() { /** - * Properties of an ExtensionRangeOptions. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { + function FileOptions(properties) { this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18461,80 +24076,377 @@ } /** - * ExtensionRangeOptions uninterpretedOption. + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FileOptions} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decode = function decode(reader, length) { + FileOptions.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.protobuf.ExtensionRangeOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -18544,365 +24456,522 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FileOptions} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRangeOptions.verify = function verify(message) { + FileOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "uninterpretedOption." + error; + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; } } return null; }; /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FileOptions} FileOptions */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } return message; }; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } return object; }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExtensionRangeOptions + * Gets the default type url for FileOptions * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FileOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + return typeUrlPrefix + "/google.protobuf.FileOptions"; }; - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(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]]; - } - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ - FieldDescriptorProto.prototype.name = ""; + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + return FileOptions; + })(); - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + protobuf.MessageOptions = (function() { /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ - FieldDescriptorProto.prototype.type = 1; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - FieldDescriptorProto.prototype.typeName = ""; + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.extendee = ""; + MessageOptions.prototype.messageSetWireFormat = false; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.defaultValue = ""; + MessageOptions.prototype.noStandardDescriptorAccessor = false; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + MessageOptions.prototype.deprecated = false; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + MessageOptions.prototype.mapEntry = false; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.options = null; + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + MessageOptions.prototype[".google.api.resource"] = null; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + MessageOptions.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + MessageOptions.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.protobuf.FieldDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); + message.messageSetWireFormat = reader.bool(); break; } case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); + message.noStandardDescriptorAccessor = reader.bool(); break; } - case 9: { - message.oneofIndex = reader.int32(); + case 3: { + message.deprecated = reader.bool(); break; } - case 10: { - message.jsonName = reader.string(); + case 7: { + message.mapEntry = reader.bool(); break; } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 17: { - message.proto3Optional = reader.bool(); + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); break; } default: @@ -18914,394 +24983,197 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); if (error) - return "options." + error; + return ".google.api.resource." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; return null; }; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for MessageOptions * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); - - return FieldDescriptorProto; + return MessageOptions; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior */ /** - * Constructs a new OneofDescriptorProto. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19309,820 +25181,807 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - OneofDescriptorProto.prototype.name = ""; + FieldOptions.prototype.ctype = 0; /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - OneofDescriptorProto.prototype.options = null; + FieldOptions.prototype.packed = false; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + FieldOptions.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.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decode = function decode(reader, length) { + FieldOptions.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.protobuf.OneofDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } if (options.defaults) { - object.name = ""; - object.options = null; + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - 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]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - EnumDescriptorProto.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.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value */ - EnumDescriptorProto.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.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; }; /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); }; /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(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]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.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.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + OneofOptions.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.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - }; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EnumReservedRange; - })(); + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; - return EnumDescriptorProto; + return OneofOptions; })(); - protobuf.EnumValueDescriptorProto = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of an EnumValueDescriptorProto. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function EnumValueDescriptorProto(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20130,103 +25989,106 @@ } /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - EnumValueDescriptorProto.prototype.name = ""; + EnumOptions.prototype.allowAlias = false; /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - EnumValueDescriptorProto.prototype.number = 0; + EnumOptions.prototype.deprecated = false; /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - EnumValueDescriptorProto.prototype.options = null; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumOptions.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.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumOptions.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.protobuf.EnumValueDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } case 2: { - message.number = reader.int32(); + message.allowAlias = reader.bool(); break; } case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -20238,147 +26100,159 @@ }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumOptions.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } return null; }; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } return message; }; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueDescriptorProto + * Gets the default type url for EnumOptions * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; - return EnumValueDescriptorProto; + return EnumOptions; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20386,106 +26260,92 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + EnumValueOptions.prototype.deprecated = false; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - ServiceDescriptorProto.prototype.options = null; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + EnumValueOptions.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.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + EnumValueOptions.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.protobuf.ServiceDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); break; } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -20497,167 +26357,152 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + EnumValueOptions.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.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "method." + error; + return "uninterpretedOption." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } return null; }; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return ServiceDescriptorProto; + return EnumValueOptions; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new MethodDescriptorProto. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20665,145 +26510,120 @@ } /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + ServiceOptions.prototype.deprecated = false; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodDescriptorProto.prototype.options = null; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + ServiceOptions.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + ServiceOptions.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.protobuf.MethodDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 5: { - message.clientStreaming = reader.bool(); + case 1049: { + message[".google.api.defaultHost"] = reader.string(); break; } - case 6: { - message.serverStreaming = reader.bool(); + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); break; } default: @@ -20815,191 +26635,172 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + ServiceOptions.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.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return MethodDescriptorProto; + return ServiceOptions; })(); - protobuf.FileOptions = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a FileOptions. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new FileOptions. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function FileOptions(properties) { + function MethodOptions(properties) { this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21007,375 +26808,570 @@ } /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - FileOptions.prototype.javaPackage = ""; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions * @instance */ - FileOptions.prototype.javaOuterClassname = ""; + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - FileOptions.prototype.javaMultipleFiles = false; + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FileOptions.prototype.javaStringCheckUtf8 = false; + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.prototype.optimizeFor = 1; + MethodOptions.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.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.prototype.goPackage = ""; + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.prototype.ccGenericServices = false; + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions */ - FileOptions.prototype.javaGenericServices = false; + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FileOptions.prototype.pyGenericServices = false; + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions * @instance + * @returns {Object.} JSON object */ - FileOptions.prototype.phpGenericServices = false; + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileOptions.prototype.deprecated = false; + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value */ - FileOptions.prototype.ccEnableArenas = true; + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + return MethodOptions; + })(); - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + protobuf.UninterpretedOption = (function() { /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ - FileOptions.prototype.swiftPrefix = ""; /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - FileOptions.prototype.phpClassPrefix = ""; + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.phpNamespace = ""; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.phpMetadataNamespace = ""; + UninterpretedOption.prototype.identifierValue = ""; /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.rubyPackage = ""; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + UninterpretedOption.prototype.doubleValue = 0; /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + UninterpretedOption.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.protobuf.FileOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 42: { - message.phpGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } - case 40: { - message.phpClassPrefix = reader.string(); + case 3: { + message.identifierValue = reader.string(); break; } - case 41: { - message.phpNamespace = reader.string(); + case 4: { + message.positiveIntValue = reader.uint64(); break; } - case 44: { - message.phpMetadataNamespace = reader.string(); + case 5: { + message.negativeIntValue = reader.int64(); break; } - case 45: { - message.rubyPackage = reader.string(); + case 6: { + message.doubleValue = reader.double(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 7: { + message.stringValue = reader.bytes(); break; } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + case 8: { + message.aggregateValue = reader.string(); break; } default: @@ -21387,373 +27383,454 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); if (error) - return ".google.api.resourceDefinition." + error; + return "name." + error; } } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; }; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } + if (options.arrays || options.defaults) + object.name = []; if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this FileOptions to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.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.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; + return NamePart; })(); - return FileOptions; + return UninterpretedOption; })(); - protobuf.MessageOptions = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a MessageOptions. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new MessageOptions. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21761,350 +27838,585 @@ } /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - MessageOptions.prototype.messageSetWireFormat = false; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MessageOptions.prototype.deprecated = false; + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MessageOptions.prototype.mapEntry = false; + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + SourceCodeInfo.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.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.prototype[".google.api.resource"] = null; + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; }; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - MessageOptions.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.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.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.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; - return MessageOptions; + return Location; + })(); + + return SourceCodeInfo; })(); - protobuf.FieldOptions = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a FieldOptions. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new FieldOptions. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22112,215 +28424,78 @@ } /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + GeneratedCodeInfo.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.protobuf.FieldOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: @@ -22332,587 +28507,501 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); if (error) - return "uninterpretedOption." + error; + return "annotation." + error; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } return null; }; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - } + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } } return message; }; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this FieldOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); + GeneratedCodeInfo.Annotation = (function() { - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ - return FieldOptions; - })(); + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } - protobuf.OneofOptions = (function() { + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.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.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.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.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: break; } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { default: - reader.skipType(tag & 7); + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; break; } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } - } - return message; - }; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); - return OneofOptions; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - protobuf.EnumOptions = (function() { + protobuf.Duration = (function() { /** - * Properties of an EnumOptions. + * Properties of a Duration. * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new EnumOptions. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22920,106 +29009,89 @@ } /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - EnumOptions.prototype.deprecated = false; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + Duration.prototype.nanos = 0; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + Duration.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.protobuf.EnumOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); + case 1: { + message.seconds = reader.int64(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.nanos = reader.int32(); break; } default: @@ -23031,159 +29103,146 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Duration} Duration */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this EnumOptions to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; - return EnumOptions; + return Duration; })(); - protobuf.EnumValueOptions = (function() { + protobuf.Struct = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a Struct. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new EnumValueOptions. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23191,92 +29250,97 @@ } /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + Struct.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.protobuf.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; break; } default: @@ -23288,152 +29352,146 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); if (error) - return "uninterpretedOption." + error; + return "fields." + error; } } return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Struct} Struct */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); } } return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Struct * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Struct * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.Struct"; }; - return EnumValueOptions; + return Struct; })(); - protobuf.ServiceOptions = (function() { + protobuf.Value = (function() { /** - * Properties of a ServiceOptions. + * Properties of a Value. * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new ServiceOptions. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23441,120 +29499,159 @@ } /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value * @instance */ - ServiceOptions.prototype.deprecated = false; + Value.prototype.nullValue = null; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + Value.prototype.numberValue = null; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + Value.prototype.stringValue = null; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + Value.prototype.boolValue = null; /** - * Creates a new ServiceOptions instance using the specified properties. + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + Value.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.protobuf.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); + case 1: { + message.nullValue = reader.int32(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.numberValue = reader.double(); break; } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); + case 3: { + message.stringValue = reader.string(); break; } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } default: @@ -23566,309 +29663,314 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); if (error) - return "uninterpretedOption." + error; + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Value} Value */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for Value * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + return typeUrlPrefix + "/google.protobuf.Value"; }; - return ServiceOptions; + return Value; })(); - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - 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]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - MethodOptions.prototype[".google.api.http"] = null; + function ListValue(properties) { + this.values = []; + 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]]; + } /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + ListValue.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.protobuf.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; } default: @@ -23880,238 +29982,140 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); if (error) - return "uninterpretedOption." + error; + return "values." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.ListValue} ListValue */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); } } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for ListValue * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ListValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.ListValue"; }; - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; + return ListValue; })(); - protobuf.UninterpretedOption = (function() { + protobuf.Any = (function() { /** - * Properties of an UninterpretedOption. + * Properties of an Any. * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new UninterpretedOption. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24119,164 +30123,297 @@ } /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - UninterpretedOption.prototype.name = $util.emptyArray; + Any.prototype.type_url = ""; /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - UninterpretedOption.prototype.identifierValue = ""; + Any.prototype.value = $util.newBuffer([]); /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Any.create = function create(properties) { + return new Any(properties); + }; /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.prototype.doubleValue = 0; + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + Any.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.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any * @instance + * @returns {Object.} JSON object */ - UninterpretedOption.prototype.aggregateValue = ""; + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; }; + return Any; + })(); + + protobuf.Empty = (function() { + /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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 Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + Empty.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.protobuf.UninterpretedOption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -24286,454 +30423,329 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Empty} Empty */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; + return typeUrlPrefix + "/google.protobuf.Empty"; }; + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } + /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance - * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FieldMask.prototype.paths = $util.emptyArray; /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.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.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.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.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; } + default: + reader.skipType(tag & 7); + break; } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - }; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return NamePart; - })(); + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; - return UninterpretedOption; + return FieldMask; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24741,78 +30753,89 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + Timestamp.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.protobuf.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -24824,502 +30847,695 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - SourceCodeInfo.Location = (function() { + return Timestamp; + })(); - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ + return protobuf; + })(); - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - 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]]; - } + google.longrunning = (function() { - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + longrunning.Operations = (function() { - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @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 Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(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]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.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.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.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.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) return object; - }; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Location; - })(); + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; - return SourceCodeInfo; + return Operation; })(); - protobuf.GeneratedCodeInfo = (function() { + longrunning.GetOperationRequest = (function() { /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name */ /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function GetOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25327,78 +31543,75 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + GetOperationRequest.prototype.name = ""; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new GetOperationRequest instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + GetOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a GetOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length) { + GetOperationRequest.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.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -25410,501 +31623,397 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a GetOperationRequest message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeneratedCodeInfo.verify = function verify(message) { + GetOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + GetOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this GetOperationRequest to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.GetOperationRequest * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + GetOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for GetOperationRequest * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + return GetOperationRequest; + })(); - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + longrunning.ListOperationsRequest = (function() { - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(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]]; + } - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.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.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.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.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); break; } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; + case 1: { + message.filter = reader.string(); break; } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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"; + return null; + }; - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return Annotation; - })(); + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GeneratedCodeInfo; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; })(); - protobuf.Duration = (function() { + longrunning.ListOperationsResponse = (function() { /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken */ /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set */ - function Duration(properties) { + function ListOperationsResponse(properties) { + this.operations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25912,89 +32021,92 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListOperationsResponse.prototype.operations = $util.emptyArray; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse * @instance */ - Duration.prototype.nanos = 0; + ListOperationsResponse.prototype.nextPageToken = ""; /** - * Creates a new Duration instance using the specified properties. + * Creates a new ListOperationsResponse instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance */ - Duration.create = function create(properties) { - return new Duration(properties); + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + ListOperationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[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); return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a ListOperationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + ListOperationsResponse.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.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); break; } case 2: { - message.nanos = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -26006,146 +32118,148 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a ListOperationsResponse message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + ListOperationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + ListOperationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Duration to JSON. + * Converts this ListOperationsResponse to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + ListOperationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for ListOperationsResponse * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.longrunning.ListOperationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; }; - return Duration; + return ListOperationsResponse; })(); - protobuf.Struct = (function() { + longrunning.CancelOperationRequest = (function() { /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name */ /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function CancelOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26153,97 +32267,75 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest * @instance */ - Struct.prototype.fields = $util.emptyObject; + CancelOperationRequest.prototype.name = ""; /** - * Creates a new Struct instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance */ - Struct.create = function create(properties) { - return new Struct(properties); + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + CancelOperationRequest.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.protobuf.Struct(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; + message.name = reader.string(); break; } default: @@ -26255,306 +32347,198 @@ }; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decodeDelimited = function decodeDelimited(reader) { + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Struct message. + * Verifies a CancelOperationRequest message. * @function verify - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Struct.verify = function verify(message) { + CancelOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + CancelOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Struct to JSON. + * Converts this CancelOperationRequest to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + CancelOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Struct + * Gets the default type url for CancelOperationRequest * @function getTypeUrl - * @memberof google.protobuf.Struct + * @memberof google.longrunning.CancelOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Struct"; + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; }; - return Struct; + return CancelOperationRequest; })(); - protobuf.Value = (function() { + longrunning.DeleteOperationRequest = (function() { /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name */ /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set */ - function Value(properties) { + function DeleteOperationRequest(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]]; } - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest * @instance */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteOperationRequest.prototype.name = ""; /** - * Creates a new Value instance using the specified properties. + * Creates a new DeleteOperationRequest instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance */ - Value.create = function create(properties) { - return new Value(properties); + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + DeleteOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes a DeleteOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + DeleteOperationRequest.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.protobuf.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -26566,235 +32550,123 @@ }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies a DeleteOperationRequest message. * @function verify - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + DeleteOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.protobuf.Value} message Value + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Value to JSON. + * Converts this DeleteOperationRequest to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + DeleteOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Value + * Gets the default type url for DeleteOperationRequest * @function getTypeUrl - * @memberof google.protobuf.Value + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Value"; + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; }; - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; + return DeleteOperationRequest; })(); - protobuf.ListValue = (function() { + longrunning.WaitOperationRequest = (function() { /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout */ /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function WaitOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26802,78 +32674,89 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest * @instance */ - ListValue.prototype.values = $util.emptyArray; + WaitOperationRequest.prototype.name = ""; /** - * Creates a new ListValue instance using the specified properties. + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encode = function encode(message, writer) { + WaitOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a WaitOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + WaitOperationRequest.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.protobuf.ListValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -26885,138 +32768,137 @@ }; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decodeDelimited = function decodeDelimited(reader) { + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListValue message. + * Verifies a WaitOperationRequest message. * @function verify - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListValue.verify = function verify(message) { + WaitOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; } return null; }; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); } return message; }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + WaitOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + if (options.defaults) { + object.name = ""; + object.timeout = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; /** - * Converts this ListValue to JSON. + * Converts this WaitOperationRequest to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + WaitOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListValue + * Gets the default type url for WaitOperationRequest * @function getTypeUrl - * @memberof google.protobuf.ListValue + * @memberof google.longrunning.WaitOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ListValue"; + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; }; - return ListValue; + return WaitOperationRequest; })(); - protobuf.Empty = (function() { + longrunning.OperationInfo = (function() { /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType */ /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set */ - function Empty(properties) { + function OperationInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27024,63 +32906,91 @@ } /** - * Creates a new Empty instance using the specified properties. + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance */ - Empty.create = function create(properties) { - return new Empty(properties); + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.longrunning.OperationInfo} OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + OperationInfo.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.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27090,110 +33000,146 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.longrunning.OperationInfo} OperationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + OperationInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies an OperationInfo message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + OperationInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.longrunning.OperationInfo} OperationInfo */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.longrunning.OperationInfo} message OperationInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; }; /** - * Converts this Empty to JSON. + * Converts this OperationInfo to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + OperationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Empty + * Gets the default type url for OperationInfo * @function getTypeUrl - * @memberof google.protobuf.Empty + * @memberof google.longrunning.OperationInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Empty"; + return typeUrlPrefix + "/google.longrunning.OperationInfo"; }; - return Empty; + return OperationInfo; })(); - protobuf.FieldMask = (function() { + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27201,78 +33147,106 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Status.prototype.code = 0; /** - * Creates a new FieldMask instance using the specified properties. + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Status.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.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; } default: @@ -27284,117 +33258,140 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a Status message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.rpc.Status} Status */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; /** - * Converts this FieldMask to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldMask + * Gets the default type url for Status * @function getTypeUrl - * @memberof google.protobuf.FieldMask + * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldMask"; + return typeUrlPrefix + "/google.rpc.Status"; }; - return FieldMask; + return Status; })(); - return protobuf; + return rpc; })(); return google; diff --git a/packages/google-cloud-video-stitcher/protos/protos.json b/packages/google-cloud-video-stitcher/protos/protos.json index a2c87448fcb..a578129b8a2 100644 --- a/packages/google-cloud-video-stitcher/protos/protos.json +++ b/packages/google-cloud-video-stitcher/protos/protos.json @@ -357,6 +357,129 @@ } } }, + "AdTracking": { + "values": { + "AD_TRACKING_UNSPECIFIED": 0, + "CLIENT": 1, + "SERVER": 2 + } + }, + "LiveConfig": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/LiveConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/liveConfigs/{live_config}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adTagUri": { + "type": "string", + "id": 3 + }, + "gamLiveConfig": { + "type": "GamLiveConfig", + "id": 4 + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "adTracking": { + "type": "AdTracking", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultSlate": { + "type": "string", + "id": 7, + "options": { + "(google.api.resource_reference).type": "videostitcher.googleapis.com/Slate" + } + }, + "stitchingPolicy": { + "type": "StitchingPolicy", + "id": 8 + }, + "prefetchConfig": { + "type": "PrefetchConfig", + "id": 10 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3 + } + }, + "StitchingPolicy": { + "values": { + "STITCHING_POLICY_UNSPECIFIED": 0, + "CUT_CURRENT": 1, + "COMPLETE_AD": 2 + } + } + } + }, + "PrefetchConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "initialAdRequestDuration": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "GamLiveConfig": { + "fields": { + "networkCode": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "assetKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customAssetKey": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "VodSession": { "options": { "(google.api.resource).type": "videostitcher.googleapis.com/VodSession", @@ -403,10 +526,6 @@ "type": "string", "id": 7 }, - "clientAdTracking": { - "type": "bool", - "id": 8 - }, "manifestOptions": { "type": "ManifestOptions", "id": 9 @@ -417,6 +536,37 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "adTracking": { + "type": "AdTracking", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gamSettings": { + "type": "GamSettings", + "id": 13 + } + }, + "nested": { + "GamSettings": { + "fields": { + "networkCode": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "streamId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } } } }, @@ -500,66 +650,42 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "sourceUri": { - "type": "string", - "id": 3 - }, - "defaultAdTagId": { - "type": "string", - "id": 4 - }, - "adTagMap": { - "keyType": "string", - "type": "AdTag", - "id": 5 - }, "adTagMacros": { "keyType": "string", "type": "string", "id": 6 }, - "clientAdTracking": { - "type": "bool", - "id": 7 - }, - "defaultSlateId": { - "type": "string", - "id": 8 - }, - "stitchingPolicy": { - "type": "StitchingPolicy", - "id": 9 - }, "manifestOptions": { "type": "ManifestOptions", "id": 10 }, - "streamId": { + "gamSettings": { + "type": "GamSettings", + "id": 15 + }, + "liveConfig": { "type": "string", - "id": 11, + "id": 16, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveConfig" } } }, "nested": { - "StitchingPolicy": { - "values": { - "STITCHING_POLICY_UNSPECIFIED": 0, - "COMPLETE_AD": 1, - "CUT_CURRENT": 3 + "GamSettings": { + "fields": { + "streamId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } } } }, - "AdTag": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, "ManifestOptions": { "fields": { "includeRenditions": { @@ -610,6 +736,30 @@ "uri": { "type": "string", "id": 2 + }, + "gamSlate": { + "type": "GamSlate", + "id": 3 + } + }, + "nested": { + "GamSlate": { + "fields": { + "networkCode": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gamSlateId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } }, @@ -678,11 +828,13 @@ "methods": { "CreateCdnKey": { "requestType": "CreateCdnKeyRequest", - "responseType": "CdnKey", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/cdnKeys", "(google.api.http).body": "cdn_key", - "(google.api.method_signature)": "parent,cdn_key,cdn_key_id" + "(google.api.method_signature)": "parent,cdn_key,cdn_key_id", + "(google.longrunning.operation_info).response_type": "google.cloud.video.stitcher.v1.CdnKey", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -693,6 +845,12 @@ }, { "(google.api.method_signature)": "parent,cdn_key,cdn_key_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.video.stitcher.v1.CdnKey", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, @@ -734,10 +892,12 @@ }, "DeleteCdnKey": { "requestType": "DeleteCdnKeyRequest", - "responseType": "google.protobuf.Empty", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/cdnKeys/*}", - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -747,16 +907,24 @@ }, { "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, "UpdateCdnKey": { "requestType": "UpdateCdnKeyRequest", - "responseType": "CdnKey", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).patch": "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}", "(google.api.http).body": "cdn_key", - "(google.api.method_signature)": "cdn_key,update_mask" + "(google.api.method_signature)": "cdn_key,update_mask", + "(google.longrunning.operation_info).response_type": "google.cloud.video.stitcher.v1.CdnKey", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -767,6 +935,12 @@ }, { "(google.api.method_signature)": "cdn_key,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.video.stitcher.v1.CdnKey", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, @@ -918,11 +1092,13 @@ }, "CreateSlate": { "requestType": "CreateSlateRequest", - "responseType": "Slate", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/slates", "(google.api.http).body": "slate", - "(google.api.method_signature)": "parent,slate,slate_id" + "(google.api.method_signature)": "parent,slate,slate_id", + "(google.longrunning.operation_info).response_type": "google.cloud.video.stitcher.v1.Slate", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -933,6 +1109,12 @@ }, { "(google.api.method_signature)": "parent,slate,slate_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.video.stitcher.v1.Slate", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, @@ -974,11 +1156,13 @@ }, "UpdateSlate": { "requestType": "UpdateSlateRequest", - "responseType": "Slate", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).patch": "/v1/{slate.name=projects/*/locations/*/slates/*}", "(google.api.http).body": "slate", - "(google.api.method_signature)": "slate,update_mask" + "(google.api.method_signature)": "slate,update_mask", + "(google.longrunning.operation_info).response_type": "google.cloud.video.stitcher.v1.Slate", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -989,15 +1173,23 @@ }, { "(google.api.method_signature)": "slate,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.video.stitcher.v1.Slate", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, "DeleteSlate": { "requestType": "DeleteSlateRequest", - "responseType": "google.protobuf.Empty", + "responseType": "google.longrunning.Operation", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/slates/*}", - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" }, "parsedOptions": [ { @@ -1007,6 +1199,12 @@ }, { "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } } ] }, @@ -1047,6 +1245,96 @@ "(google.api.method_signature)": "name" } ] + }, + "CreateLiveConfig": { + "requestType": "CreateLiveConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/liveConfigs", + "(google.api.http).body": "live_config", + "(google.api.method_signature)": "parent,live_config,live_config_id", + "(google.longrunning.operation_info).response_type": "google.cloud.video.stitcher.v1.LiveConfig", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/liveConfigs", + "body": "live_config" + } + }, + { + "(google.api.method_signature)": "parent,live_config,live_config_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.video.stitcher.v1.LiveConfig", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } + } + ] + }, + "ListLiveConfigs": { + "requestType": "ListLiveConfigsRequest", + "responseType": "ListLiveConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/liveConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/liveConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLiveConfig": { + "requestType": "GetLiveConfigRequest", + "responseType": "LiveConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/liveConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/liveConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteLiveConfig": { + "requestType": "DeleteLiveConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/liveConfigs/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/liveConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.video.stitcher.v1.OperationMetadata" + } + } + ] } } }, @@ -1353,6 +1641,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "requestId": { + "type": "string", + "id": 4 } } }, @@ -1474,6 +1766,132 @@ } } } + }, + "CreateLiveConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/LiveConfig" + } + }, + "liveConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "liveConfig": { + "type": "LiveConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4 + } + } + }, + "ListLiveConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/LiveConfig" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLiveConfigsResponse": { + "fields": { + "liveConfigs": { + "rule": "repeated", + "type": "LiveConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetLiveConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveConfig" + } + } + } + }, + "DeleteLiveConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveConfig" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + } + } } } } @@ -2699,6 +3117,18 @@ } } }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, "Empty": { "fields": {} }, @@ -2710,6 +3140,263 @@ "id": 1 } } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } } } } diff --git a/packages/google-cloud-video-stitcher/samples/README.md b/packages/google-cloud-video-stitcher/samples/README.md index 23ba8a8cde1..4fcfc45c983 100644 --- a/packages/google-cloud-video-stitcher/samples/README.md +++ b/packages/google-cloud-video-stitcher/samples/README.md @@ -13,13 +13,16 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) * [Video_stitcher_service.create_cdn_key](#video_stitcher_service.create_cdn_key) + * [Video_stitcher_service.create_live_config](#video_stitcher_service.create_live_config) * [Video_stitcher_service.create_live_session](#video_stitcher_service.create_live_session) * [Video_stitcher_service.create_slate](#video_stitcher_service.create_slate) * [Video_stitcher_service.create_vod_session](#video_stitcher_service.create_vod_session) * [Video_stitcher_service.delete_cdn_key](#video_stitcher_service.delete_cdn_key) + * [Video_stitcher_service.delete_live_config](#video_stitcher_service.delete_live_config) * [Video_stitcher_service.delete_slate](#video_stitcher_service.delete_slate) * [Video_stitcher_service.get_cdn_key](#video_stitcher_service.get_cdn_key) * [Video_stitcher_service.get_live_ad_tag_detail](#video_stitcher_service.get_live_ad_tag_detail) + * [Video_stitcher_service.get_live_config](#video_stitcher_service.get_live_config) * [Video_stitcher_service.get_live_session](#video_stitcher_service.get_live_session) * [Video_stitcher_service.get_slate](#video_stitcher_service.get_slate) * [Video_stitcher_service.get_vod_ad_tag_detail](#video_stitcher_service.get_vod_ad_tag_detail) @@ -27,13 +30,13 @@ * [Video_stitcher_service.get_vod_stitch_detail](#video_stitcher_service.get_vod_stitch_detail) * [Video_stitcher_service.list_cdn_keys](#video_stitcher_service.list_cdn_keys) * [Video_stitcher_service.list_live_ad_tag_details](#video_stitcher_service.list_live_ad_tag_details) + * [Video_stitcher_service.list_live_configs](#video_stitcher_service.list_live_configs) * [Video_stitcher_service.list_slates](#video_stitcher_service.list_slates) * [Video_stitcher_service.list_vod_ad_tag_details](#video_stitcher_service.list_vod_ad_tag_details) * [Video_stitcher_service.list_vod_stitch_details](#video_stitcher_service.list_vod_stitch_details) * [Video_stitcher_service.update_cdn_key](#video_stitcher_service.update_cdn_key) * [Video_stitcher_service.update_slate](#video_stitcher_service.update_slate) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -67,6 +70,23 @@ __Usage:__ +### Video_stitcher_service.create_live_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js` + + +----- + + + + ### Video_stitcher_service.create_live_session View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js). @@ -135,6 +155,23 @@ __Usage:__ +### Video_stitcher_service.delete_live_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js` + + +----- + + + + ### Video_stitcher_service.delete_slate View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js). @@ -186,6 +223,23 @@ __Usage:__ +### Video_stitcher_service.get_live_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.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-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js` + + +----- + + + + ### Video_stitcher_service.get_live_session View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js). @@ -305,6 +359,23 @@ __Usage:__ +### Video_stitcher_service.list_live_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.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-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js` + + +----- + + + + ### Video_stitcher_service.list_slates View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js). @@ -402,23 +473,6 @@ __Usage:__ `node packages/google-cloud-video-stitcher/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/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-stitcher/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-video-stitcher/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json index 574e878a261..db58fb876d5 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "0.3.1", + "version": "0.3.2", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 69, "type": "FULL" } ], @@ -44,7 +44,7 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.video.stitcher.v1.CdnKey", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], @@ -180,7 +180,7 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.protobuf.Empty", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -206,7 +206,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 61, "type": "FULL" } ], @@ -224,7 +224,7 @@ "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.cloud.video.stitcher.v1.CdnKey", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -382,7 +382,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], @@ -470,7 +470,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], @@ -598,7 +598,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 82, "type": "FULL" } ], @@ -618,9 +618,13 @@ { "name": "slate", "type": ".google.cloud.video.stitcher.v1.Slate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.video.stitcher.v1.Slate", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -646,7 +650,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 73, "type": "FULL" } ], @@ -742,7 +746,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 59, "type": "FULL" } ], @@ -760,7 +764,7 @@ "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.cloud.video.stitcher.v1.Slate", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -786,7 +790,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 55, "type": "FULL" } ], @@ -800,7 +804,7 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.protobuf.Empty", + "resultType": ".google.longrunning.Operation", "client": { "shortName": "VideoStitcherServiceClient", "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" @@ -898,6 +902,194 @@ } } } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_async", + "title": "VideoStitcherService createLiveConfig Sample", + "origin": "API_DEFINITION", + "description": " Registers the live config with the provided unique ID in the specified region.", + "canonical": true, + "file": "video_stitcher_service.create_live_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "live_config_id", + "type": "TYPE_STRING" + }, + { + "name": "live_config", + "type": ".google.cloud.video.stitcher.v1.LiveConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "CreateLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveConfig", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_async", + "title": "VideoStitcherService listLiveConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists all live configs managed by the Video Stitcher that belong to the specified project and region.", + "canonical": true, + "file": "video_stitcher_service.list_live_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLiveConfigs", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigs", + "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.stitcher.v1.ListLiveConfigsResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListLiveConfigs", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveConfigs", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_async", + "title": "VideoStitcherService getLiveConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified live config managed by the Video Stitcher service.", + "canonical": true, + "file": "video_stitcher_service.get_live_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.LiveConfig", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveConfig", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_async", + "title": "VideoStitcherService deleteLiveConfig Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified live config.", + "canonical": true, + "file": "video_stitcher_service.delete_live_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "DeleteLiveConfig", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteLiveConfig", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js index 30f51875b6b..84ef728cf9d 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js @@ -29,8 +29,8 @@ function main(parent, cdnKey, cdnKeyId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The project in which the CDN key should be created, in the form of - * `projects/{project_number}/locations/{location}`. + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. */ // const parent = 'abc123' /** @@ -38,8 +38,8 @@ function main(parent, cdnKey, cdnKeyId) { */ // const cdnKey = {} /** - * Required. The ID to use for the CDN key, which will become the final component of - * the CDN key's resource name. + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. * This value should conform to RFC-1034, which restricts to * lower-case letters, numbers, and hyphen, with the first character a * letter, the last a letter or a number, and a 63 character maximum. @@ -61,7 +61,8 @@ function main(parent, cdnKey, cdnKeyId) { }; // Run request - const response = await stitcherClient.createCdnKey(request); + const [operation] = await stitcherClient.createCdnKey(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js new file mode 100644 index 00000000000..f45225f5dde --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_config.js @@ -0,0 +1,87 @@ +// 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, liveConfigId, liveConfig) { + // [START videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_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 project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. The unique identifier ID to use for the live config. + */ + // const liveConfigId = 'abc123' + /** + * Required. The live config resource to create. + */ + // const liveConfig = {} + /** + * 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 Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callCreateLiveConfig() { + // Construct request + const request = { + parent, + liveConfigId, + liveConfig, + }; + + // Run request + const [operation] = await stitcherClient.createLiveConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLiveConfig(); + // [END videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js index 8dec8bf88fa..3fd5e8d4017 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js @@ -29,8 +29,8 @@ function main(parent, liveSession) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The project and location in which the live session should be created, - * in the form of `projects/{project_number}/locations/{location}`. + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js index 0484fdb3ab9..c89dfd53a46 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js @@ -30,7 +30,7 @@ function main(parent, slateId, slate) { */ /** * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}`. + * `projects/{project_number}/locations/{location}`. */ // const parent = 'abc123' /** @@ -44,6 +44,20 @@ function main(parent, slateId, slate) { * Required. The slate to create. */ // const slate = {} + /** + * 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 Stitcher library const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; @@ -60,7 +74,8 @@ function main(parent, slateId, slate) { }; // Run request - const response = await stitcherClient.createSlate(request); + const [operation] = await stitcherClient.createSlate(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js index ed288958583..9dcfada3105 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js @@ -29,8 +29,8 @@ function main(parent, vodSession) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The project and location in which the VOD session should be created, in the - * form of `projects/{project_number}/locations/{location}`. + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js index 2a4d6748d02..12416f62ad6 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js @@ -47,7 +47,8 @@ function main(name) { }; // Run request - const response = await stitcherClient.deleteCdnKey(request); + const [operation] = await stitcherClient.deleteCdnKey(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js new file mode 100644 index 00000000000..d0aeb6c930f --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_live_config.js @@ -0,0 +1,63 @@ +// 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 videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_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 live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callDeleteLiveConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await stitcherClient.deleteLiveConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteLiveConfig(); + // [END videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js index fa60f843ac1..e0be2b579df 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js @@ -47,7 +47,8 @@ function main(name) { }; // Run request - const response = await stitcherClient.deleteSlate(request); + const [operation] = await stitcherClient.deleteSlate(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js new file mode 100644 index 00000000000..848c25d52c2 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_config.js @@ -0,0 +1,63 @@ +// 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 videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_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 live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetLiveConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getLiveConfig(request); + console.log(response); + } + + callGetLiveConfig(); + // [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js index 317c437c5f8..f919af3b3be 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the slate to be retrieved, of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js index 0cdd81d1f3e..ec56be2b903 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the ad tag detail for the specified VOD session, in the form of + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js index b649c83fe92..e163438554b 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the stitch detail in the specified VOD session, in the form of + * Required. The name of the stitch detail in the specified VOD session, in + * the form of * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js new file mode 100644 index 00000000000..ef90b9102fb --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_configs.js @@ -0,0 +1,83 @@ +// 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 videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_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 project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply to list results (see + * Filtering (https://google.aip.dev/160)). + */ + // const filter = 'abc123' + /** + * Optional. Specifies the ordering of results following + * Cloud API + * syntax (https://cloud.google.com/apis/design/design_patterns#sorting_order). + */ + // const orderBy = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListLiveConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listLiveConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLiveConfigs(); + // [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js index 220229e7af6..7ab12212368 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js @@ -29,7 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The project to list slates, in the form of `projects/{project_number}`. + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js index 2ab97b3696e..ae6251dae4f 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js @@ -29,8 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The VOD session which the ad tag details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js index 06f85ea44a8..0d3b33b3e94 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js @@ -29,8 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The VOD session where the stitch details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{id}`. + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js index 250553b50eb..e448efed6ba 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js @@ -53,7 +53,8 @@ function main(cdnKey, updateMask) { }; // Run request - const response = await stitcherClient.updateCdnKey(request); + const [operation] = await stitcherClient.updateCdnKey(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js index b018e5a6860..8c53d30787d 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js @@ -51,7 +51,8 @@ function main(slate, updateMask) { }; // Run request - const response = await stitcherClient.updateSlate(request); + const [operation] = await stitcherClient.updateSlate(request); + const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json b/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json index 6af8b697956..4326d81a918 100644 --- a/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json +++ b/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json @@ -10,26 +10,11 @@ "grpc": { "libraryClient": "VideoStitcherServiceClient", "rpcs": { - "CreateCdnKey": { - "methods": [ - "createCdnKey" - ] - }, "GetCdnKey": { "methods": [ "getCdnKey" ] }, - "DeleteCdnKey": { - "methods": [ - "deleteCdnKey" - ] - }, - "UpdateCdnKey": { - "methods": [ - "updateCdnKey" - ] - }, "CreateVodSession": { "methods": [ "createVodSession" @@ -55,14 +40,44 @@ "getLiveAdTagDetail" ] }, - "CreateSlate": { + "GetSlate": { "methods": [ - "createSlate" + "getSlate" ] }, - "GetSlate": { + "CreateLiveSession": { "methods": [ - "getSlate" + "createLiveSession" + ] + }, + "GetLiveSession": { + "methods": [ + "getLiveSession" + ] + }, + "GetLiveConfig": { + "methods": [ + "getLiveConfig" + ] + }, + "CreateCdnKey": { + "methods": [ + "createCdnKey" + ] + }, + "DeleteCdnKey": { + "methods": [ + "deleteCdnKey" + ] + }, + "UpdateCdnKey": { + "methods": [ + "updateCdnKey" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" ] }, "UpdateSlate": { @@ -75,14 +90,14 @@ "deleteSlate" ] }, - "CreateLiveSession": { + "CreateLiveConfig": { "methods": [ - "createLiveSession" + "createLiveConfig" ] }, - "GetLiveSession": { + "DeleteLiveConfig": { "methods": [ - "getLiveSession" + "deleteLiveConfig" ] }, "ListCdnKeys": { @@ -119,32 +134,24 @@ "listSlatesStream", "listSlatesAsync" ] + }, + "ListLiveConfigs": { + "methods": [ + "listLiveConfigs", + "listLiveConfigsStream", + "listLiveConfigsAsync" + ] } } }, "grpc-fallback": { "libraryClient": "VideoStitcherServiceClient", "rpcs": { - "CreateCdnKey": { - "methods": [ - "createCdnKey" - ] - }, "GetCdnKey": { "methods": [ "getCdnKey" ] }, - "DeleteCdnKey": { - "methods": [ - "deleteCdnKey" - ] - }, - "UpdateCdnKey": { - "methods": [ - "updateCdnKey" - ] - }, "CreateVodSession": { "methods": [ "createVodSession" @@ -170,14 +177,44 @@ "getLiveAdTagDetail" ] }, - "CreateSlate": { + "GetSlate": { "methods": [ - "createSlate" + "getSlate" ] }, - "GetSlate": { + "CreateLiveSession": { "methods": [ - "getSlate" + "createLiveSession" + ] + }, + "GetLiveSession": { + "methods": [ + "getLiveSession" + ] + }, + "GetLiveConfig": { + "methods": [ + "getLiveConfig" + ] + }, + "CreateCdnKey": { + "methods": [ + "createCdnKey" + ] + }, + "DeleteCdnKey": { + "methods": [ + "deleteCdnKey" + ] + }, + "UpdateCdnKey": { + "methods": [ + "updateCdnKey" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" ] }, "UpdateSlate": { @@ -190,14 +227,14 @@ "deleteSlate" ] }, - "CreateLiveSession": { + "CreateLiveConfig": { "methods": [ - "createLiveSession" + "createLiveConfig" ] }, - "GetLiveSession": { + "DeleteLiveConfig": { "methods": [ - "getLiveSession" + "deleteLiveConfig" ] }, "ListCdnKeys": { @@ -234,6 +271,13 @@ "listSlatesStream", "listSlatesAsync" ] + }, + "ListLiveConfigs": { + "methods": [ + "listLiveConfigs", + "listLiveConfigsStream", + "listLiveConfigsAsync" + ] } } } diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts index 47c836ba4bb..b97fd2c2e04 100644 --- a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts @@ -23,6 +23,8 @@ import type { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, + LROperation, PaginationCallback, GaxCall, } from 'google-gax'; @@ -64,6 +66,7 @@ export class VideoStitcherServiceClient { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; videoStitcherServiceStub?: Promise<{[name: string]: Function}>; /** @@ -188,6 +191,9 @@ export class VideoStitcherServiceClient { liveAdTagDetailPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}' ), + liveConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/liveConfigs/{live_config}' + ), liveSessionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/liveSessions/{live_session}' ), @@ -240,6 +246,136 @@ export class VideoStitcherServiceClient { 'nextPageToken', 'slates' ), + listLiveConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'liveConfigs' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createCdnKeyResponse = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.CdnKey' + ) as gax.protobuf.Type; + const createCdnKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteCdnKeyResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteCdnKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCdnKeyResponse = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.CdnKey' + ) as gax.protobuf.Type; + const updateCdnKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createSlateResponse = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.Slate' + ) as gax.protobuf.Type; + const createSlateMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateSlateResponse = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.Slate' + ) as gax.protobuf.Type; + const updateSlateMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteSlateResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteSlateMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createLiveConfigResponse = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.LiveConfig' + ) as gax.protobuf.Type; + const createLiveConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteLiveConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteLiveConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.video.stitcher.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createCdnKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCdnKeyResponse.decode.bind(createCdnKeyResponse), + createCdnKeyMetadata.decode.bind(createCdnKeyMetadata) + ), + deleteCdnKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteCdnKeyResponse.decode.bind(deleteCdnKeyResponse), + deleteCdnKeyMetadata.decode.bind(deleteCdnKeyMetadata) + ), + updateCdnKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCdnKeyResponse.decode.bind(updateCdnKeyResponse), + updateCdnKeyMetadata.decode.bind(updateCdnKeyMetadata) + ), + createSlate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createSlateResponse.decode.bind(createSlateResponse), + createSlateMetadata.decode.bind(createSlateMetadata) + ), + updateSlate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateSlateResponse.decode.bind(updateSlateResponse), + updateSlateMetadata.decode.bind(updateSlateMetadata) + ), + deleteSlate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSlateResponse.decode.bind(deleteSlateResponse), + deleteSlateMetadata.decode.bind(deleteSlateMetadata) + ), + createLiveConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLiveConfigResponse.decode.bind(createLiveConfigResponse), + createLiveConfigMetadata.decode.bind(createLiveConfigMetadata) + ), + deleteLiveConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteLiveConfigResponse.decode.bind(deleteLiveConfigResponse), + deleteLiveConfigMetadata.decode.bind(deleteLiveConfigMetadata) + ), }; // Put together the default options sent with requests. @@ -313,6 +449,10 @@ export class VideoStitcherServiceClient { 'deleteSlate', 'createLiveSession', 'getLiveSession', + 'createLiveConfig', + 'listLiveConfigs', + 'getLiveConfig', + 'deleteLiveConfig', ]; for (const methodName of videoStitcherServiceStubMethods) { const callPromise = this.videoStitcherServiceStub.then( @@ -329,7 +469,10 @@ export class VideoStitcherServiceClient { } ); - const descriptor = this.descriptors.page[methodName] || undefined; + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -397,22 +540,13 @@ export class VideoStitcherServiceClient { // -- Service calls -- // ------------------- /** - * Creates a new CDN key. + * Returns the specified CDN key. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The project in which the CDN key should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey - * Required. The CDN key resource to create. - * @param {string} request.cdnKeyId - * Required. The ID to use for the CDN key, which will become the final component of - * the CDN key's resource name. - * - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. + * @param {string} request.name + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. * @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. @@ -420,54 +554,54 @@ export class VideoStitcherServiceClient { * 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/video_stitcher_service.create_cdn_key.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async + * @example include:samples/generated/v1/video_stitcher_service.get_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async */ - createCdnKey( - request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + getCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, options?: CallOptions ): Promise< [ protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, {} | undefined ] >; - createCdnKey( - request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + getCdnKey( + request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, options: CallOptions, callback: Callback< protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | null | undefined, {} | null | undefined > ): void; - createCdnKey( - request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + getCdnKey( + request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, callback: Callback< protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | null | undefined, {} | null | undefined > ): void; - createCdnKey( - request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + getCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, optionsOrCallback?: | CallOptions | Callback< protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | null | undefined, {} | null | undefined >, callback?: Callback< protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | null | undefined, {} | null | undefined @@ -475,7 +609,7 @@ export class VideoStitcherServiceClient { ): Promise< [ protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, {} | undefined ] > | void { @@ -492,82 +626,91 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createCdnKey(request, options, callback); + return this.innerApiCalls.getCdnKey(request, options, callback); } /** - * Returns the specified CDN key. + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * @param {string} request.parent + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.VodSession} request.vodSession + * Required. Parameters for creating a session. * @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.stitcher.v1.CdnKey | CdnKey}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.VodSession | VodSession}. * 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/video_stitcher_service.get_cdn_key.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async + * @example include:samples/generated/v1/video_stitcher_service.create_vod_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async */ - getCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + createVodSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | undefined + ), {} | undefined ] >; - getCdnKey( - request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + createVodSession( + request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest | null | undefined, {} | null | undefined > ): void; - getCdnKey( - request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + createVodSession( + request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest | null | undefined, {} | null | undefined > ): void; - getCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + createVodSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | undefined + ), {} | undefined ] > | void { @@ -584,82 +727,83 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.getCdnKey(request, options, callback); + return this.innerApiCalls.createVodSession(request, options, callback); } /** - * Deletes the specified CDN key. + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. * @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.protobuf.Empty | Empty}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.VodSession | VodSession}. * 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/video_stitcher_service.delete_cdn_key.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async + * @example include:samples/generated/v1/video_stitcher_service.get_vod_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodSession_async */ - deleteCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + getVodSession( + request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, options?: CallOptions ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, {} | undefined ] >; - deleteCdnKey( - request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + getVodSession( + request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, options: CallOptions, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | null | undefined, {} | null | undefined > ): void; - deleteCdnKey( - request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + getVodSession( + request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | null | undefined, {} | null | undefined > ): void; - deleteCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + getVodSession( + request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, {} | undefined ] > | void { @@ -679,83 +823,86 @@ export class VideoStitcherServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteCdnKey(request, options, callback); + return this.innerApiCalls.getVodSession(request, options, callback); } /** - * Updates the specified CDN key. Only update fields specified - * in the call method body. + * Returns the specified stitching information for the specified VOD session. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey - * Required. The CDN key resource which replaces the resource on the server. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {string} request.name + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. * @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.stitcher.v1.CdnKey | CdnKey}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.VodStitchDetail | VodStitchDetail}. * 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/video_stitcher_service.update_cdn_key.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async + * @example include:samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async */ - updateCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + getVodStitchDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | undefined + ), {} | undefined ] >; - updateCdnKey( - request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + getVodStitchDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest | null | undefined, {} | null | undefined > ): void; - updateCdnKey( - request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + getVodStitchDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest | null | undefined, {} | null | undefined > ): void; - updateCdnKey( - request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + getVodStitchDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ICdnKey, - | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ICdnKey, - protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | undefined + ), {} | undefined ] > | void { @@ -772,89 +919,87 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'cdn_key.name': request.cdnKey!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateCdnKey(request, options, callback); + return this.innerApiCalls.getVodStitchDetail(request, options, callback); } /** - * Creates a client side playback VOD session and returns the full - * tracking and playback metadata of the session. + * Returns the specified ad tag detail for the specified VOD session. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location in which the VOD session should be created, in the - * form of `projects/{project_number}/locations/{location}`. - * @param {google.cloud.video.stitcher.v1.VodSession} request.vodSession - * Required. Parameters for creating a session. + * @param {string} request.name + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. * @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.stitcher.v1.VodSession | VodSession}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.VodAdTagDetail | VodAdTagDetail}. * 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/video_stitcher_service.create_vod_session.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async + * @example include:samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async */ - createVodSession( - request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + getVodAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, ( - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | undefined ), {} | undefined ] >; - createVodSession( - request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + getVodAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | null | undefined, {} | null | undefined > ): void; - createVodSession( - request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + getVodAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | null | undefined, {} | null | undefined > ): void; - createVodSession( - request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + getVodAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, ( - | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest | undefined ), {} | undefined @@ -873,83 +1018,88 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createVodSession(request, options, callback); + return this.innerApiCalls.getVodAdTagDetail(request, options, callback); } /** - * Returns the full tracking, playback metadata, and relevant ad-ops - * logs for the specified VOD session. + * Returns the specified ad tag detail for the specified live session. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. * @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.stitcher.v1.VodSession | VodSession}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.LiveAdTagDetail | LiveAdTagDetail}. * 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/video_stitcher_service.get_vod_session.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodSession_async + * @example include:samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async */ - getVodSession( - request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + getLiveAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodSession, - protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | undefined + ), {} | undefined ] >; - getVodSession( - request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + getLiveAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest | null | undefined, {} | null | undefined > ): void; - getVodSession( - request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + getLiveAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest | null | undefined, {} | null | undefined > ): void; - getVodSession( - request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + getLiveAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.IVodSession, - | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodSession, - protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | undefined + ), {} | undefined ] > | void { @@ -969,83 +1119,171 @@ export class VideoStitcherServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.getVodSession(request, options, callback); + return this.innerApiCalls.getLiveAdTagDetail(request, options, callback); } /** - * Returns the specified stitching information for the specified VOD session. + * Returns the specified slate. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. * @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.stitcher.v1.VodStitchDetail | VodStitchDetail}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.Slate | Slate}. * 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/video_stitcher_service.get_vod_stitch_detail.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async + * @example include:samples/generated/v1/video_stitcher_service.get_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetSlate_async */ - getVodStitchDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + getSlate( + request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | undefined, + {} | undefined + ] + >; + getSlate( + request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): void; + getSlate( + request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): void; + getSlate( + request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IGetSlateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | 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.getSlate(request, options, callback); + } + /** + * Creates a new live session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.LiveSession} request.liveSession + * Required. Parameters for creating a live session. + * @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.stitcher.v1.LiveSession | LiveSession}. + * 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/video_stitcher_service.create_live_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async + */ + createLiveSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveSession, ( - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | undefined ), {} | undefined ] >; - getVodStitchDetail( - request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + createLiveSession( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | null | undefined, {} | null | undefined > ): void; - getVodStitchDetail( - request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + createLiveSession( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | null | undefined, {} | null | undefined > ): void; - getVodStitchDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + createLiveSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + protos.google.cloud.video.stitcher.v1.ILiveSession, ( - | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest | undefined ), {} | undefined @@ -1064,88 +1302,82 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.getVodStitchDetail(request, options, callback); + return this.innerApiCalls.createLiveSession(request, options, callback); } /** - * Returns the specified ad tag detail for the specified VOD session. + * Returns the details for the specified live session. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. * @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.stitcher.v1.VodAdTagDetail | VodAdTagDetail}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.LiveSession | LiveSession}. * 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/video_stitcher_service.get_vod_ad_tag_detail.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async + * @example include:samples/generated/v1/video_stitcher_service.get_live_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async */ - getVodAdTagDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + getLiveSession( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - ( - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest - | undefined - ), + protos.google.cloud.video.stitcher.v1.ILiveSession, + protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, {} | undefined ] >; - getVodAdTagDetail( - request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + getLiveSession( + request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | null | undefined, {} | null | undefined > ): void; - getVodAdTagDetail( - request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + getLiveSession( + request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | null | undefined, {} | null | undefined > ): void; - getVodAdTagDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + getLiveSession( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, - ( - | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest - | undefined - ), + protos.google.cloud.video.stitcher.v1.ILiveSession, + protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, {} | undefined ] > | void { @@ -1165,85 +1397,334 @@ export class VideoStitcherServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.getVodAdTagDetail(request, options, callback); + return this.innerApiCalls.getLiveSession(request, options, callback); } /** - * Returns the specified ad tag detail for the specified live session. + * Returns the specified live config managed by the Video + * Stitcher service. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. * @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.stitcher.v1.LiveAdTagDetail | LiveAdTagDetail}. + * The first element of the array is an object representing {@link google.cloud.video.stitcher.v1.LiveConfig | LiveConfig}. * 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/video_stitcher_service.get_live_ad_tag_detail.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async + * @example include:samples/generated/v1/video_stitcher_service.get_live_config.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_async */ - getLiveAdTagDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + getLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - ( - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest - | undefined - ), + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | undefined, {} | undefined ] >; - getLiveAdTagDetail( - request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + getLiveConfig( + request: protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveConfig, + | protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | null | undefined, {} | null | undefined > ): void; - getLiveAdTagDetail( - request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + getLiveConfig( + request: protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveConfig, + | protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | null | undefined, {} | null | undefined > ): void; - getLiveAdTagDetail( - request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + getLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveConfig, + | protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + protos.google.cloud.video.stitcher.v1.ILiveConfig, + | protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, - ( - | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest - | undefined - ), + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IGetLiveConfigRequest | 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.getLiveConfig(request, options, callback); + } + + /** + * Creates a new CDN key. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey + * Required. The CDN key resource to create. + * @param {string} request.cdnKeyId + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @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/video_stitcher_service.create_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async + */ + createCdnKey( + request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCdnKey( + request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCdnKey( + request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + callback: Callback< + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCdnKey( + request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.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.createCdnKey(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createCdnKey()`. + * @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/video_stitcher_service.create_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async + */ + async checkCreateCdnKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.stitcher.v1.CdnKey, + protos.google.cloud.video.stitcher.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.createCdnKey, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.stitcher.v1.CdnKey, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } + /** + * Deletes the specified CDN key. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * @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/video_stitcher_service.delete_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async + */ + deleteCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteCdnKey( + request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteCdnKey( + request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1263,86 +1744,130 @@ export class VideoStitcherServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.getLiveAdTagDetail(request, options, callback); + return this.innerApiCalls.deleteCdnKey(request, options, callback); } /** - * Creates a slate. + * Check the status of the long running operation returned by `deleteCdnKey()`. + * @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/video_stitcher_service.delete_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async + */ + async checkDeleteCdnKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.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.deleteCdnKey, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}`. - * @param {string} request.slateId - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @param {google.cloud.video.stitcher.v1.Slate} request.slate - * Required. The slate to create. + * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey + * Required. The CDN key resource which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask * @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.stitcher.v1.Slate | Slate}. + * 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#regular-methods) + * [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/video_stitcher_service.create_slate.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateSlate_async + * @example include:samples/generated/v1/video_stitcher_service.update_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async */ - createSlate( - request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + updateCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.ICreateSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - createSlate( - request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + updateCdnKey( + request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createSlate( - request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + updateCdnKey( + request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createSlate( - request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + updateCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.ICreateSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1359,76 +1884,150 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'cdn_key.name': request.cdnKey!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createSlate(request, options, callback); + return this.innerApiCalls.updateCdnKey(request, options, callback); } /** - * Returns the specified slate. + * Check the status of the long running operation returned by `updateCdnKey()`. + * @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/video_stitcher_service.update_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async + */ + async checkUpdateCdnKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.stitcher.v1.CdnKey, + protos.google.cloud.video.stitcher.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.updateCdnKey, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.stitcher.v1.CdnKey, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } + /** + * Creates a slate. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the slate to be retrieved, of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. + * @param {string} request.parent + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * @param {string} request.slateId + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @param {google.cloud.video.stitcher.v1.Slate} request.slate + * Required. The slate to create. + * @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 {@link google.cloud.video.stitcher.v1.Slate | Slate}. + * 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#regular-methods) + * [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/video_stitcher_service.get_slate.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetSlate_async + * @example include:samples/generated/v1/video_stitcher_service.create_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateSlate_async */ - getSlate( - request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + createSlate( + request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IGetSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - getSlate( - request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + createSlate( + request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - getSlate( - request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + createSlate( + request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - getSlate( - request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + createSlate( + request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.IGetSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IGetSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1445,10 +2044,45 @@ export class VideoStitcherServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.getSlate(request, options, callback); + return this.innerApiCalls.createSlate(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createSlate()`. + * @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/video_stitcher_service.create_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateSlate_async + */ + async checkCreateSlateProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.stitcher.v1.Slate, + protos.google.cloud.video.stitcher.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.createSlate, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.stitcher.v1.Slate, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; } /** * Updates the specified slate. @@ -1462,9 +2096,11 @@ export class VideoStitcherServiceClient { * @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.stitcher.v1.Slate | Slate}. + * 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#regular-methods) + * [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/video_stitcher_service.update_slate.js * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async @@ -1474,8 +2110,11 @@ export class VideoStitcherServiceClient { options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; @@ -1483,20 +2122,22 @@ export class VideoStitcherServiceClient { request: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; updateSlate( request: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; @@ -1505,23 +2146,28 @@ export class VideoStitcherServiceClient { optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ISlate, - | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ISlate, - protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1543,6 +2189,41 @@ export class VideoStitcherServiceClient { this.initialize(); return this.innerApiCalls.updateSlate(request, options, callback); } + /** + * Check the status of the long running operation returned by `updateSlate()`. + * @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/video_stitcher_service.update_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async + */ + async checkUpdateSlateProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.stitcher.v1.Slate, + protos.google.cloud.video.stitcher.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.updateSlate, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.stitcher.v1.Slate, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } /** * Deletes the specified slate. * @@ -1554,9 +2235,11 @@ export class VideoStitcherServiceClient { * @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.protobuf.Empty | Empty}. + * 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#regular-methods) + * [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/video_stitcher_service.delete_slate.js * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async @@ -1566,8 +2249,11 @@ export class VideoStitcherServiceClient { options?: CallOptions ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; @@ -1575,20 +2261,22 @@ export class VideoStitcherServiceClient { request: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, options: CallOptions, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; deleteSlate( request: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; @@ -1597,23 +2285,28 @@ export class VideoStitcherServiceClient { optionsOrCallback?: | CallOptions | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1636,84 +2329,142 @@ export class VideoStitcherServiceClient { return this.innerApiCalls.deleteSlate(request, options, callback); } /** - * Creates a new live session. + * Check the status of the long running operation returned by `deleteSlate()`. + * @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/video_stitcher_service.delete_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async + */ + async checkDeleteSlateProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.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.deleteSlate, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } + /** + * Registers the live config 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 project and location in which the live session should be created, - * in the form of `projects/{project_number}/locations/{location}`. - * @param {google.cloud.video.stitcher.v1.LiveSession} request.liveSession - * Required. Parameters for creating a live session. + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * @param {string} request.liveConfigId + * Required. The unique identifier ID to use for the live config. + * @param {google.cloud.video.stitcher.v1.LiveConfig} request.liveConfig + * Required. The live config resource to create. + * @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 {@link google.cloud.video.stitcher.v1.LiveSession | LiveSession}. + * 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#regular-methods) + * [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/video_stitcher_service.create_live_session.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async + * @example include:samples/generated/v1/video_stitcher_service.create_live_config.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_async */ - createLiveSession( - request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + createLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveSession, - ( - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | undefined - ), + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - createLiveSession( - request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + createLiveConfig( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createLiveSession( - request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + createLiveConfig( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createLiveSession( - request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + createLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveConfigRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveSession, - ( - | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest - | undefined - ), + LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1733,79 +2484,126 @@ export class VideoStitcherServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.createLiveSession(request, options, callback); + return this.innerApiCalls.createLiveConfig(request, options, callback); } /** - * Returns the details for the specified live session. + * Check the status of the long running operation returned by `createLiveConfig()`. + * @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/video_stitcher_service.create_live_config.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_async + */ + async checkCreateLiveConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.video.stitcher.v1.LiveConfig, + protos.google.cloud.video.stitcher.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.createLiveConfig, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.video.stitcher.v1.LiveConfig, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; + } + /** + * Deletes the specified live config. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. * @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.stitcher.v1.LiveSession | LiveSession}. + * 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#regular-methods) + * [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/video_stitcher_service.get_live_session.js - * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async + * @example include:samples/generated/v1/video_stitcher_service.delete_live_config.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_async */ - getLiveSession( - request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + deleteLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveSession, - protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - getLiveSession( - request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + deleteLiveConfig( + request: protos.google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, options: CallOptions, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - getLiveSession( - request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + deleteLiveConfig( + request: protos.google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, callback: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - getLiveSession( - request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + deleteLiveConfig( + request?: protos.google.cloud.video.stitcher.v1.IDeleteLiveConfigRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.video.stitcher.v1.ILiveSession, - | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest - | null - | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.video.stitcher.v1.ILiveSession, - protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1825,9 +2623,43 @@ export class VideoStitcherServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.getLiveSession(request, options, callback); + return this.innerApiCalls.deleteLiveConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteLiveConfig()`. + * @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/video_stitcher_service.delete_live_config.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_async + */ + async checkDeleteLiveConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.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.deleteLiveConfig, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.video.stitcher.v1.OperationMetadata + >; } - /** * Lists all CDN keys in the specified project and location. * @@ -2042,8 +2874,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session where the stitch details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{id}`. + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2141,8 +2973,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session where the stitch details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{id}`. + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2188,8 +3020,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session where the stitch details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{id}`. + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2234,8 +3066,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session which the ad tag details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2333,8 +3165,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session which the ad tag details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2380,8 +3212,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The VOD session which the ad tag details belong to, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. * @param {number} request.pageSize * The maximum number of items to return. * @param {string} request.pageToken @@ -2618,7 +3450,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project to list slates, in the form of `projects/{project_number}`. + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. * @param {number} request.pageSize * Requested page size. Server may return fewer items than requested. * If unspecified, server will pick an appropriate default. @@ -2721,7 +3554,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project to list slates, in the form of `projects/{project_number}`. + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. * @param {number} request.pageSize * Requested page size. Server may return fewer items than requested. * If unspecified, server will pick an appropriate default. @@ -2772,7 +3606,8 @@ export class VideoStitcherServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project to list slates, in the form of `projects/{project_number}`. + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. * @param {number} request.pageSize * Requested page size. Server may return fewer items than requested. * If unspecified, server will pick an appropriate default. @@ -2816,6 +3651,395 @@ export class VideoStitcherServiceClient { callSettings ) as AsyncIterable; } + /** + * Lists all live configs managed by the Video Stitcher that + * belong to the specified project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {string} [request.filter] + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](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.stitcher.v1.LiveConfig | LiveConfig}. + * 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 `listLiveConfigsAsync()` + * 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. + */ + listLiveConfigs( + request?: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveConfig[], + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest | null, + protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + ] + >; + listLiveConfigs( + request: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveConfig + > + ): void; + listLiveConfigs( + request: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveConfig + > + ): void; + listLiveConfigs( + request?: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveConfig + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveConfig + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveConfig[], + protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest | null, + protos.google.cloud.video.stitcher.v1.IListLiveConfigsResponse + ] + > | 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.listLiveConfigs(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 project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {string} [request.filter] + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](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 {Stream} + * An object stream which emits an object representing {@link google.cloud.video.stitcher.v1.LiveConfig | LiveConfig} 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 `listLiveConfigsAsync()` + * 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. + */ + listLiveConfigsStream( + request?: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + 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['listLiveConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLiveConfigs.createStream( + this.innerApiCalls.listLiveConfigs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLiveConfigs`, 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 project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {string} [request.filter] + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](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 {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.stitcher.v1.LiveConfig | LiveConfig}. 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/video_stitcher_service.list_live_configs.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_async + */ + listLiveConfigsAsync( + request?: protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, + 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['listLiveConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLiveConfigs.asyncIterate( + this.innerApiCalls['listLiveConfigs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2944,6 +4168,58 @@ export class VideoStitcherServiceClient { ).live_ad_tag_detail; } + /** + * Return a fully-qualified liveConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} live_config + * @returns {string} Resource name string. + */ + liveConfigPath(project: string, location: string, liveConfig: string) { + return this.pathTemplates.liveConfigPathTemplate.render({ + project: project, + location: location, + live_config: liveConfig, + }); + } + + /** + * Parse the project from LiveConfig resource. + * + * @param {string} liveConfigName + * A fully-qualified path representing LiveConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLiveConfigName(liveConfigName: string) { + return this.pathTemplates.liveConfigPathTemplate.match(liveConfigName) + .project; + } + + /** + * Parse the location from LiveConfig resource. + * + * @param {string} liveConfigName + * A fully-qualified path representing LiveConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLiveConfigName(liveConfigName: string) { + return this.pathTemplates.liveConfigPathTemplate.match(liveConfigName) + .location; + } + + /** + * Parse the live_config from LiveConfig resource. + * + * @param {string} liveConfigName + * A fully-qualified path representing LiveConfig resource. + * @returns {string} A string representing the live_config. + */ + matchLiveConfigFromLiveConfigName(liveConfigName: string) { + return this.pathTemplates.liveConfigPathTemplate.match(liveConfigName) + .live_config; + } + /** * Return a fully-qualified liveSession resource name string. * @@ -3317,6 +4593,7 @@ export class VideoStitcherServiceClient { return this.videoStitcherServiceStub.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json index 691ca37cb93..b9fe3e0a69b 100644 --- a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json @@ -6,6 +6,9 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" ] }, "retry_params": { @@ -17,6 +20,15 @@ "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 } }, "methods": { @@ -119,6 +131,26 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListLiveConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json index c3a39905131..0c5c1421b3b 100644 --- a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/video/stitcher/v1/cdn_keys.proto", "../../protos/google/cloud/video/stitcher/v1/companions.proto", "../../protos/google/cloud/video/stitcher/v1/events.proto", + "../../protos/google/cloud/video/stitcher/v1/live_configs.proto", "../../protos/google/cloud/video/stitcher/v1/sessions.proto", "../../protos/google/cloud/video/stitcher/v1/slates.proto", "../../protos/google/cloud/video/stitcher/v1/stitch_details.proto", diff --git a/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts index 354d13c0017..4481e86bd2c 100644 --- a/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts +++ b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts @@ -25,7 +25,7 @@ import * as videostitcherserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -66,6 +66,38 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + function stubPageStreamingCall( responses?: ResponseType[], error?: Error @@ -235,8 +267,8 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('createCdnKey', () => { - it('invokes createCdnKey without error', async () => { + describe('getCdnKey', () => { + it('invokes getCdnKey without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -244,31 +276,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CdnKey() ); - client.innerApiCalls.createCdnKey = stubSimpleCall(expectedResponse); - const [response] = await client.createCdnKey(request); + client.innerApiCalls.getCdnKey = stubSimpleCall(expectedResponse); + const [response] = await client.getCdnKey(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createCdnKey without error using callback', async () => { + it('invokes getCdnKey without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -276,21 +308,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CdnKey() ); - client.innerApiCalls.createCdnKey = + client.innerApiCalls.getCdnKey = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createCdnKey( + client.getCdnKey( request, ( err?: Error | null, @@ -307,16 +339,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createCdnKey with error', async () => { + it('invokes getCdnKey with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -324,31 +356,28 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createCdnKey = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createCdnKey(request), expectedError); + client.innerApiCalls.getCdnKey = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCdnKey(request), expectedError); const actualRequest = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createCdnKey as SinonStub + client.innerApiCalls.getCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createCdnKey with closed client', async () => { + it('invokes getCdnKey with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -356,21 +385,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] ); - request.parent = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.createCdnKey(request), expectedError); + await assert.rejects(client.getCdnKey(request), expectedError); }); }); - describe('getCdnKey', () => { - it('invokes getCdnKey without error', async () => { + describe('createVodSession', () => { + it('invokes createVodSession without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -378,31 +407,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodSession() ); - client.innerApiCalls.getCdnKey = stubSimpleCall(expectedResponse); - const [response] = await client.getCdnKey(request); + client.innerApiCalls.createVodSession = stubSimpleCall(expectedResponse); + const [response] = await client.createVodSession(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getCdnKey without error using callback', async () => { + it('invokes createVodSession without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -410,25 +439,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodSession() ); - client.innerApiCalls.getCdnKey = + client.innerApiCalls.createVodSession = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getCdnKey( + client.createVodSession( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ICdnKey | null + result?: protos.google.cloud.video.stitcher.v1.IVodSession | null ) => { if (err) { reject(err); @@ -441,16 +470,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getCdnKey with error', async () => { + it('invokes createVodSession with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -458,28 +487,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getCdnKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getCdnKey(request), expectedError); + client.innerApiCalls.createVodSession = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createVodSession(request), expectedError); const actualRequest = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getCdnKey as SinonStub + client.innerApiCalls.createVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getCdnKey with closed client', async () => { + it('invokes createVodSession with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -487,21 +519,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] ); - request.name = defaultValue1; + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getCdnKey(request), expectedError); + await assert.rejects(client.createVodSession(request), expectedError); }); }); - describe('deleteCdnKey', () => { - it('invokes deleteCdnKey without error', async () => { + describe('getVodSession', () => { + it('invokes getVodSession without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -509,31 +541,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.cloud.video.stitcher.v1.VodSession() ); - client.innerApiCalls.deleteCdnKey = stubSimpleCall(expectedResponse); - const [response] = await client.deleteCdnKey(request); + client.innerApiCalls.getVodSession = stubSimpleCall(expectedResponse); + const [response] = await client.getVodSession(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteCdnKey without error using callback', async () => { + it('invokes getVodSession without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -541,25 +573,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.cloud.video.stitcher.v1.VodSession() ); - client.innerApiCalls.deleteCdnKey = + client.innerApiCalls.getVodSession = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteCdnKey( + client.getVodSession( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.cloud.video.stitcher.v1.IVodSession | null ) => { if (err) { reject(err); @@ -572,16 +604,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteCdnKey with error', async () => { + it('invokes getVodSession with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -589,31 +621,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteCdnKey = stubSimpleCall( + client.innerApiCalls.getVodSession = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteCdnKey(request), expectedError); + await assert.rejects(client.getVodSession(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteCdnKey as SinonStub + client.innerApiCalls.getVodSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteCdnKey with closed client', async () => { + it('invokes getVodSession with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -621,21 +653,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.deleteCdnKey(request), expectedError); + await assert.rejects(client.getVodSession(request), expectedError); }); }); - describe('updateCdnKey', () => { - it('invokes updateCdnKey without error', async () => { + describe('getVodStitchDetail', () => { + it('invokes getVodStitchDetail without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -643,32 +675,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); - request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', - ['cdnKey', 'name'] + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] ); - request.cdnKey.name = defaultValue1; - const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() ); - client.innerApiCalls.updateCdnKey = stubSimpleCall(expectedResponse); - const [response] = await client.updateCdnKey(request); + client.innerApiCalls.getVodStitchDetail = + stubSimpleCall(expectedResponse); + const [response] = await client.getVodStitchDetail(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateCdnKey without error using callback', async () => { + it('invokes getVodStitchDetail without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -676,26 +708,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); - request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', - ['cdnKey', 'name'] + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] ); - request.cdnKey.name = defaultValue1; - const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() ); - client.innerApiCalls.updateCdnKey = + client.innerApiCalls.getVodStitchDetail = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateCdnKey( + client.getVodStitchDetail( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ICdnKey | null + result?: protos.google.cloud.video.stitcher.v1.IVodStitchDetail | null ) => { if (err) { reject(err); @@ -708,16 +739,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateCdnKey with error', async () => { + it('invokes getVodStitchDetail with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -725,32 +756,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); - request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', - ['cdnKey', 'name'] + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] ); - request.cdnKey.name = defaultValue1; - const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateCdnKey = stubSimpleCall( + client.innerApiCalls.getVodStitchDetail = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateCdnKey(request), expectedError); + await assert.rejects(client.getVodStitchDetail(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateCdnKey as SinonStub + client.innerApiCalls.getVodStitchDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateCdnKey with closed client', async () => { + it('invokes getVodStitchDetail with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -758,22 +788,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); - request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', - ['cdnKey', 'name'] + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] ); - request.cdnKey.name = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.updateCdnKey(request), expectedError); + await assert.rejects(client.getVodStitchDetail(request), expectedError); }); }); - describe('createVodSession', () => { - it('invokes createVodSession without error', async () => { + describe('getVodAdTagDetail', () => { + it('invokes getVodAdTagDetail without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -781,31 +810,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodSession() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ); - client.innerApiCalls.createVodSession = stubSimpleCall(expectedResponse); - const [response] = await client.createVodSession(request); + client.innerApiCalls.getVodAdTagDetail = stubSimpleCall(expectedResponse); + const [response] = await client.getVodAdTagDetail(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createVodSession without error using callback', async () => { + it('invokes getVodAdTagDetail without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -813,25 +842,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodSession() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ); - client.innerApiCalls.createVodSession = + client.innerApiCalls.getVodAdTagDetail = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createVodSession( + client.getVodAdTagDetail( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.IVodSession | null + result?: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail | null ) => { if (err) { reject(err); @@ -844,16 +873,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createVodSession with error', async () => { + it('invokes getVodAdTagDetail with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -861,31 +890,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createVodSession = stubSimpleCall( + client.innerApiCalls.getVodAdTagDetail = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createVodSession(request), expectedError); + await assert.rejects(client.getVodAdTagDetail(request), expectedError); const actualRequest = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createVodSession as SinonStub + client.innerApiCalls.getVodAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createVodSession with closed client', async () => { + it('invokes getVodAdTagDetail with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -893,21 +922,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] ); - request.parent = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.createVodSession(request), expectedError); + await assert.rejects(client.getVodAdTagDetail(request), expectedError); }); }); - describe('getVodSession', () => { - it('invokes getVodSession without error', async () => { + describe('getLiveAdTagDetail', () => { + it('invokes getLiveAdTagDetail without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -915,31 +944,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodSession() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ); - client.innerApiCalls.getVodSession = stubSimpleCall(expectedResponse); - const [response] = await client.getVodSession(request); + client.innerApiCalls.getLiveAdTagDetail = + stubSimpleCall(expectedResponse); + const [response] = await client.getLiveAdTagDetail(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodSession without error using callback', async () => { + it('invokes getLiveAdTagDetail without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -947,25 +977,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodSession() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ); - client.innerApiCalls.getVodSession = + client.innerApiCalls.getLiveAdTagDetail = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getVodSession( + client.getLiveAdTagDetail( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.IVodSession | null + result?: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail | null ) => { if (err) { reject(err); @@ -978,16 +1008,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodSession with error', async () => { + it('invokes getLiveAdTagDetail with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -995,31 +1025,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getVodSession = stubSimpleCall( + client.innerApiCalls.getLiveAdTagDetail = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getVodSession(request), expectedError); + await assert.rejects(client.getLiveAdTagDetail(request), expectedError); const actualRequest = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodSession as SinonStub + client.innerApiCalls.getLiveAdTagDetail as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodSession with closed client', async () => { + it('invokes getLiveAdTagDetail with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1027,21 +1057,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getVodSession(request), expectedError); + await assert.rejects(client.getLiveAdTagDetail(request), expectedError); }); }); - describe('getVodStitchDetail', () => { - it('invokes getVodStitchDetail without error', async () => { + describe('getSlate', () => { + it('invokes getSlate without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1049,32 +1079,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + '.google.cloud.video.stitcher.v1.GetSlateRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ); - client.innerApiCalls.getVodStitchDetail = - stubSimpleCall(expectedResponse); - const [response] = await client.getVodStitchDetail(request); + client.innerApiCalls.getSlate = stubSimpleCall(expectedResponse); + const [response] = await client.getSlate(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodStitchDetail without error using callback', async () => { + it('invokes getSlate without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1082,25 +1111,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + '.google.cloud.video.stitcher.v1.GetSlateRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ); - client.innerApiCalls.getVodStitchDetail = + client.innerApiCalls.getSlate = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getVodStitchDetail( + client.getSlate( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.IVodStitchDetail | null + result?: protos.google.cloud.video.stitcher.v1.ISlate | null ) => { if (err) { reject(err); @@ -1113,16 +1142,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodStitchDetail with error', async () => { + it('invokes getSlate with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1130,31 +1159,28 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + '.google.cloud.video.stitcher.v1.GetSlateRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getVodStitchDetail = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getVodStitchDetail(request), expectedError); + client.innerApiCalls.getSlate = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSlate(request), expectedError); const actualRequest = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodStitchDetail as SinonStub + client.innerApiCalls.getSlate as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodStitchDetail with closed client', async () => { + it('invokes getSlate with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1162,21 +1188,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + '.google.cloud.video.stitcher.v1.GetSlateRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getVodStitchDetail(request), expectedError); + await assert.rejects(client.getSlate(request), expectedError); }); }); - describe('getVodAdTagDetail', () => { - it('invokes getVodAdTagDetail without error', async () => { + describe('createLiveSession', () => { + it('invokes createLiveSession without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1184,31 +1210,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveSession() ); - client.innerApiCalls.getVodAdTagDetail = stubSimpleCall(expectedResponse); - const [response] = await client.getVodAdTagDetail(request); + client.innerApiCalls.createLiveSession = stubSimpleCall(expectedResponse); + const [response] = await client.createLiveSession(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodAdTagDetail without error using callback', async () => { + it('invokes createLiveSession without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1216,25 +1242,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveSession() ); - client.innerApiCalls.getVodAdTagDetail = + client.innerApiCalls.createLiveSession = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getVodAdTagDetail( + client.createLiveSession( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail | null + result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null ) => { if (err) { reject(err); @@ -1247,16 +1273,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodAdTagDetail with error', async () => { + it('invokes createLiveSession with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1264,31 +1290,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getVodAdTagDetail = stubSimpleCall( + client.innerApiCalls.createLiveSession = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getVodAdTagDetail(request), expectedError); + await assert.rejects(client.createLiveSession(request), expectedError); const actualRequest = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getVodAdTagDetail as SinonStub + client.innerApiCalls.createLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getVodAdTagDetail with closed client', async () => { + it('invokes createLiveSession with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1296,21 +1322,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] ); - request.name = defaultValue1; + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getVodAdTagDetail(request), expectedError); + await assert.rejects(client.createLiveSession(request), expectedError); }); }); - describe('getLiveAdTagDetail', () => { - it('invokes getLiveAdTagDetail without error', async () => { + describe('getLiveSession', () => { + it('invokes getLiveSession without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1318,32 +1344,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveSession() ); - client.innerApiCalls.getLiveAdTagDetail = - stubSimpleCall(expectedResponse); - const [response] = await client.getLiveAdTagDetail(request); + client.innerApiCalls.getLiveSession = stubSimpleCall(expectedResponse); + const [response] = await client.getLiveSession(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveAdTagDetail without error using callback', async () => { + it('invokes getLiveSession without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1351,25 +1376,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveSession() ); - client.innerApiCalls.getLiveAdTagDetail = + client.innerApiCalls.getLiveSession = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getLiveAdTagDetail( + client.getLiveSession( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail | null + result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null ) => { if (err) { reject(err); @@ -1382,16 +1407,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveAdTagDetail with error', async () => { + it('invokes getLiveSession with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1399,31 +1424,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getLiveAdTagDetail = stubSimpleCall( + client.innerApiCalls.getLiveSession = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getLiveAdTagDetail(request), expectedError); + await assert.rejects(client.getLiveSession(request), expectedError); const actualRequest = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveAdTagDetail as SinonStub + client.innerApiCalls.getLiveSession as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveAdTagDetail with closed client', async () => { + it('invokes getLiveSession with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1431,21 +1456,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getLiveAdTagDetail(request), expectedError); + await assert.rejects(client.getLiveSession(request), expectedError); }); }); - describe('createSlate', () => { - it('invokes createSlate without error', async () => { + describe('getLiveConfig', () => { + it('invokes getLiveConfig without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1453,31 +1478,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateSlateRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetLiveConfigRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ); - client.innerApiCalls.createSlate = stubSimpleCall(expectedResponse); - const [response] = await client.createSlate(request); + client.innerApiCalls.getLiveConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getLiveConfig(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createSlate without error using callback', async () => { + it('invokes getLiveConfig without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1485,25 +1510,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateSlateRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetLiveConfigRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ); - client.innerApiCalls.createSlate = + client.innerApiCalls.getLiveConfig = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createSlate( + client.getLiveConfig( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ISlate | null + result?: protos.google.cloud.video.stitcher.v1.ILiveConfig | null ) => { if (err) { reject(err); @@ -1516,16 +1541,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createSlate with error', async () => { + it('invokes getLiveConfig with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1533,31 +1558,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateSlateRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetLiveConfigRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createSlate = stubSimpleCall( + client.innerApiCalls.getLiveConfig = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createSlate(request), expectedError); + await assert.rejects(client.getLiveConfig(request), expectedError); const actualRequest = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createSlate as SinonStub + client.innerApiCalls.getLiveConfig as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createSlate with closed client', async () => { + it('invokes getLiveConfig with closed client', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1565,21 +1590,21 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateSlateRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.GetLiveConfigRequest', + ['name'] ); - request.parent = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.createSlate(request), expectedError); + await assert.rejects(client.getLiveConfig(request), expectedError); }); }); - describe('getSlate', () => { - it('invokes getSlate without error', async () => { + describe('createCdnKey', () => { + it('invokes createCdnKey without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1587,31 +1612,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetSlateRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getSlate = stubSimpleCall(expectedResponse); - const [response] = await client.getSlate(request); + client.innerApiCalls.createCdnKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.createCdnKey(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getSlate without error using callback', async () => { + it('invokes createCdnKey without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1619,25 +1645,28 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetSlateRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getSlate = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.createCdnKey = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getSlate( + client.createCdnKey( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ISlate | null + result?: LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -1647,19 +1676,23 @@ describe('v1.VideoStitcherServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getSlate with error', async () => { + it('invokes createCdnKey with call error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1667,28 +1700,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetSlateRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getSlate = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getSlate(request), expectedError); + client.innerApiCalls.createCdnKey = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createCdnKey(request), expectedError); const actualRequest = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getSlate with closed client', async () => { + it('invokes createCdnKey with LRO error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1696,159 +1732,75 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetSlateRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getSlate(request), expectedError); - }); - }); - - describe('updateSlate', () => { - it('invokes updateSlate without error', async () => { - const client = - new videostitcherserviceModule.v1.VideoStitcherServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() - ); - request.slate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateSlateRequest', - ['slate', 'name'] - ); - request.slate.name = defaultValue1; - const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCdnKey = stubLongRunningCall( + undefined, + undefined, + expectedError ); - client.innerApiCalls.updateSlate = stubSimpleCall(expectedResponse); - const [response] = await client.updateSlate(request); - assert.deepStrictEqual(response, expectedResponse); + const [operation] = await client.createCdnKey(request); + await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.updateSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateSlate as SinonStub + client.innerApiCalls.createCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateSlate without error using callback', async () => { + it('invokes checkCreateCdnKeyProgress without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() - ); - request.slate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateSlateRequest', - ['slate', 'name'] - ); - request.slate.name = defaultValue1; - const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new operationsProtos.google.longrunning.Operation() ); - client.innerApiCalls.updateSlate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateSlate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ISlate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateSlate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateSlate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + 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.checkCreateCdnKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes updateSlate with error', async () => { + it('invokes checkCreateCdnKeyProgress with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() - ); - request.slate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateSlateRequest', - ['slate', 'name'] - ); - request.slate.name = defaultValue1; - const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateSlate = stubSimpleCall( + + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateSlate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateSlate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateSlate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSlate with closed client', async () => { - const client = - new videostitcherserviceModule.v1.VideoStitcherServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() - ); - request.slate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.UpdateSlateRequest', - ['slate', 'name'] - ); - request.slate.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateSlate(request), expectedError); + await assert.rejects(client.checkCreateCdnKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteSlate', () => { - it('invokes deleteSlate without error', async () => { + describe('deleteCdnKey', () => { + it('invokes deleteCdnKey without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1856,31 +1808,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteSlate = stubSimpleCall(expectedResponse); - const [response] = await client.deleteSlate(request); + client.innerApiCalls.deleteCdnKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteCdnKey(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteSlate without error using callback', async () => { + it('invokes deleteCdnKey without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1888,25 +1841,28 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteSlate = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.deleteCdnKey = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteSlate( + client.deleteCdnKey( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -1916,19 +1872,23 @@ describe('v1.VideoStitcherServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteSlate with error', async () => { + it('invokes deleteCdnKey with call error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1936,31 +1896,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteSlate = stubSimpleCall( + client.innerApiCalls.deleteCdnKey = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.deleteSlate(request), expectedError); + await assert.rejects(client.deleteCdnKey(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteSlate as SinonStub + client.innerApiCalls.deleteCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteSlate with closed client', async () => { + it('invokes deleteCdnKey with LRO error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1968,21 +1928,75 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', ['name'] ); request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteSlate(request), expectedError); + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCdnKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteCdnKey(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteCdnKeyProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteCdnKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteCdnKeyProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteCdnKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createLiveSession', () => { - it('invokes createLiveSession without error', async () => { + describe('updateCdnKey', () => { + it('invokes updateCdnKey without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1990,31 +2004,33 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); + request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveSession() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.createLiveSession = stubSimpleCall(expectedResponse); - const [response] = await client.createLiveSession(request); + client.innerApiCalls.updateCdnKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateCdnKey(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createLiveSession without error using callback', async () => { + it('invokes updateCdnKey without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2022,25 +2038,29 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); + request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveSession() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.createLiveSession = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.updateCdnKey = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createLiveSession( + client.updateCdnKey( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null + result?: LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -2050,19 +2070,23 @@ describe('v1.VideoStitcherServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createLiveSession with error', async () => { + it('invokes updateCdnKey with call error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2070,31 +2094,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); + request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createLiveSession = stubSimpleCall( + client.innerApiCalls.updateCdnKey = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createLiveSession(request), expectedError); + await assert.rejects(client.updateCdnKey(request), expectedError); const actualRequest = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createLiveSession as SinonStub + client.innerApiCalls.updateCdnKey as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createLiveSession with closed client', async () => { + it('invokes updateCdnKey with LRO error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2102,21 +2127,76 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); + request.cdnKey ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', - ['parent'] + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createLiveSession(request), expectedError); + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCdnKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCdnKey(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateCdnKeyProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkUpdateCdnKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCdnKeyProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkUpdateCdnKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('getLiveSession', () => { - it('invokes getLiveSession without error', async () => { + describe('createSlate', () => { + it('invokes createSlate without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2124,31 +2204,32 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveSession() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getLiveSession = stubSimpleCall(expectedResponse); - const [response] = await client.getLiveSession(request); + client.innerApiCalls.createSlate = stubLongRunningCall(expectedResponse); + const [operation] = await client.createSlate(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getLiveSession as SinonStub + client.innerApiCalls.createSlate as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveSession as SinonStub + client.innerApiCalls.createSlate as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveSession without error using callback', async () => { + it('invokes createSlate without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2156,25 +2237,28 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', - ['name'] + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveSession() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getLiveSession = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.createSlate = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getLiveSession( + client.createSlate( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null + result?: LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -2184,19 +2268,1507 @@ describe('v1.VideoStitcherServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getLiveSession as SinonStub + client.innerApiCalls.createSlate as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveSession as SinonStub + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSlate with call error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSlate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSlate with LRO error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSlate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createSlate(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateSlateProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkCreateSlateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateSlateProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkCreateSlateProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateSlate', () => { + it('invokes updateSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSlate = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateSlate(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveSession with error', async () => { + it('invokes updateSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSlate = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSlate( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSlate with call error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSlate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSlate with LRO error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSlate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateSlate(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateSlateProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkUpdateSlateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateSlateProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkUpdateSlateProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteSlate', () => { + it('invokes deleteSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSlate = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSlate(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSlate = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSlate( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate with call error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSlate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate with LRO error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSlate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteSlate(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSlateProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteSlateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSlateProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteSlateProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createLiveConfig', () => { + it('invokes createLiveConfig without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLiveConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createLiveConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveConfig without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLiveConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLiveConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.video.stitcher.v1.ILiveConfig, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveConfig with call error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLiveConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createLiveConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveConfig with LRO error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLiveConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createLiveConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateLiveConfigProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkCreateLiveConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLiveConfigProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkCreateLiveConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteLiveConfig', () => { + it('invokes deleteLiveConfig without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLiveConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteLiveConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLiveConfig without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLiveConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLiveConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLiveConfig with call error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLiveConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteLiveConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLiveConfig with LRO error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLiveConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteLiveConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLiveConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteLiveConfigProgress without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteLiveConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteLiveConfigProgress with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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.checkDeleteLiveConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listCdnKeys', () => { + it('invokes listCdnKeys without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.innerApiCalls.listCdnKeys = stubSimpleCall(expectedResponse); + const [response] = await client.listCdnKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeys without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.innerApiCalls.listCdnKeys = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCdnKeys( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ICdnKey[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeys with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCdnKeys = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCdnKeys(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeysStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.descriptors.page.listCdnKeys.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCdnKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + 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.listCdnKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCdnKeys, request) + ); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCdnKeysStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCdnKeys.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCdnKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCdnKeys, request) + ); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCdnKeys without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.descriptors.page.listCdnKeys.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; + const iterable = client.listCdnKeysAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCdnKeys with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCdnKeys.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCdnKeysAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVodStitchDetails', () => { + it('invokes listVodStitchDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.innerApiCalls.listVodStitchDetails = + stubSimpleCall(expectedResponse); + const [response] = await client.listVodStitchDetails(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetails without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.innerApiCalls.listVodStitchDetails = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVodStitchDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVodStitchDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listVodStitchDetails(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetailsStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.descriptors.page.listVodStitchDetails.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVodStitchDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + 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.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodStitchDetails, request) + ); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVodStitchDetailsStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodStitchDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVodStitchDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodStitchDetails, request) + ); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVodStitchDetails without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2204,31 +3776,50 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', - ['name'] + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getLiveSession = stubSimpleCall( - undefined, - expectedError + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.descriptors.page.listVodStitchDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + []; + const iterable = client.listVodStitchDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); - await assert.rejects(client.getLiveSession(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getLiveSession as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getLiveSession as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getLiveSession with closed client', async () => { + it('uses async iteration with listVodStitchDetails with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2236,21 +3827,43 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', - ['name'] + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodStitchDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVodStitchDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getLiveSession(request), expectedError); }); }); - describe('listCdnKeys', () => { - it('invokes listCdnKeys without error', async () => { + describe('listVodAdTagDetails', () => { + it('invokes listVodAdTagDetails without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2258,39 +3871,40 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), ]; - client.innerApiCalls.listCdnKeys = stubSimpleCall(expectedResponse); - const [response] = await client.listCdnKeys(request); + client.innerApiCalls.listVodAdTagDetails = + stubSimpleCall(expectedResponse); + const [response] = await client.listVodAdTagDetails(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCdnKeys without error using callback', async () => { + it('invokes listVodAdTagDetails without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2298,33 +3912,35 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), ]; - client.innerApiCalls.listCdnKeys = + client.innerApiCalls.listVodAdTagDetails = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCdnKeys( + client.listVodAdTagDetails( request, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ICdnKey[] | null + result?: + | protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] + | null ) => { if (err) { reject(err); @@ -2337,16 +3953,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCdnKeys with error', async () => { + it('invokes listVodAdTagDetails with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2354,31 +3970,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listCdnKeys = stubSimpleCall( + client.innerApiCalls.listVodAdTagDetails = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listCdnKeys(request), expectedError); + await assert.rejects(client.listVodAdTagDetails(request), expectedError); const actualRequest = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCdnKeys as SinonStub + client.innerApiCalls.listVodAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCdnKeysStream without error', async () => { + it('invokes listVodAdTagDetailsStream without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2386,33 +4002,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), ]; - client.descriptors.page.listCdnKeys.createStream = + client.descriptors.page.listVodAdTagDetails.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCdnKeysStream(request); + const stream = client.listVodAdTagDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = + []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { responses.push(response); } ); @@ -2426,12 +4043,12 @@ describe('v1.VideoStitcherServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCdnKeys.createStream as SinonStub) + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCdnKeys, request) + .calledWith(client.innerApiCalls.listVodAdTagDetails, request) ); assert( - (client.descriptors.page.listCdnKeys.createStream as SinonStub) + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2439,7 +4056,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('invokes listCdnKeysStream with error', async () => { + it('invokes listVodAdTagDetailsStream with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2447,25 +4064,24 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCdnKeys.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listCdnKeysStream(request); + client.descriptors.page.listVodAdTagDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVodAdTagDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = + []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { responses.push(response); } ); @@ -2478,12 +4094,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCdnKeys.createStream as SinonStub) + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCdnKeys, request) + .calledWith(client.innerApiCalls.listVodAdTagDetails, request) ); assert( - (client.descriptors.page.listCdnKeys.createStream as SinonStub) + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2491,7 +4107,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listCdnKeys without error', async () => { + it('uses async iteration with listVodAdTagDetails without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2499,41 +4115,42 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.CdnKey() + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() ), ]; - client.descriptors.page.listCdnKeys.asyncIterate = + client.descriptors.page.listVodAdTagDetails.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; - const iterable = client.listCdnKeysAsync(request); + const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = + []; + const iterable = client.listVodAdTagDetailsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2541,7 +4158,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listCdnKeys with error', async () => { + it('uses async iteration with listVodAdTagDetails with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2549,34 +4166,33 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCdnKeys.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listCdnKeysAsync(request); + client.descriptors.page.listVodAdTagDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVodAdTagDetailsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; + const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2585,8 +4201,8 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('listVodStitchDetails', () => { - it('invokes listVodStitchDetails without error', async () => { + describe('listLiveAdTagDetails', () => { + it('invokes listLiveAdTagDetails without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2594,40 +4210,40 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), ]; - client.innerApiCalls.listVodStitchDetails = + client.innerApiCalls.listLiveAdTagDetails = stubSimpleCall(expectedResponse); - const [response] = await client.listVodStitchDetails(request); + const [response] = await client.listLiveAdTagDetails(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodStitchDetails without error using callback', async () => { + it('invokes listLiveAdTagDetails without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2635,34 +4251,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), ]; - client.innerApiCalls.listVodStitchDetails = + client.innerApiCalls.listLiveAdTagDetails = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listVodStitchDetails( + client.listLiveAdTagDetails( request, ( err?: Error | null, result?: - | protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] + | protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] | null ) => { if (err) { @@ -2676,16 +4292,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodStitchDetails with error', async () => { + it('invokes listLiveAdTagDetails with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2693,31 +4309,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listVodStitchDetails = stubSimpleCall( + client.innerApiCalls.listLiveAdTagDetails = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listVodStitchDetails(request), expectedError); + await assert.rejects(client.listLiveAdTagDetails(request), expectedError); const actualRequest = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodStitchDetails as SinonStub + client.innerApiCalls.listLiveAdTagDetails as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodStitchDetailsStream without error', async () => { + it('invokes listLiveAdTagDetailsStream without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2725,34 +4341,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), ]; - client.descriptors.page.listVodStitchDetails.createStream = + client.descriptors.page.listLiveAdTagDetails.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVodStitchDetailsStream(request); + const stream = client.listLiveAdTagDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { responses.push(response); } ); @@ -2766,12 +4382,12 @@ describe('v1.VideoStitcherServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listVodStitchDetails, request) + .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) ); assert( - (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2779,7 +4395,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('invokes listVodStitchDetailsStream with error', async () => { + it('invokes listLiveAdTagDetailsStream with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2787,24 +4403,24 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listVodStitchDetails.createStream = + client.descriptors.page.listLiveAdTagDetails.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVodStitchDetailsStream(request); + const stream = client.listLiveAdTagDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { responses.push(response); } ); @@ -2817,12 +4433,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listVodStitchDetails, request) + .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) ); assert( - (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2830,7 +4446,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listVodStitchDetails without error', async () => { + it('uses async iteration with listLiveAdTagDetails without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2838,42 +4454,42 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() ), ]; - client.descriptors.page.listVodStitchDetails.asyncIterate = + client.descriptors.page.listLiveAdTagDetails.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = []; - const iterable = client.listVodStitchDetailsAsync(request); + const iterable = client.listLiveAdTagDetailsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2881,7 +4497,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listVodStitchDetails with error', async () => { + it('uses async iteration with listLiveAdTagDetails with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2889,20 +4505,20 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listVodStitchDetails.asyncIterate = + client.descriptors.page.listLiveAdTagDetails.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVodStitchDetailsAsync(request); + const iterable = client.listLiveAdTagDetailsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -2910,12 +4526,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -2924,8 +4540,8 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('listVodAdTagDetails', () => { - it('invokes listVodAdTagDetails without error', async () => { + describe('listSlates', () => { + it('invokes listSlates without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2933,40 +4549,39 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), ]; - client.innerApiCalls.listVodAdTagDetails = - stubSimpleCall(expectedResponse); - const [response] = await client.listVodAdTagDetails(request); + client.innerApiCalls.listSlates = stubSimpleCall(expectedResponse); + const [response] = await client.listSlates(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodAdTagDetails without error using callback', async () => { + it('invokes listSlates without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2974,35 +4589,33 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), ]; - client.innerApiCalls.listVodAdTagDetails = + client.innerApiCalls.listSlates = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listVodAdTagDetails( + client.listSlates( request, ( err?: Error | null, - result?: - | protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] - | null + result?: protos.google.cloud.video.stitcher.v1.ISlate[] | null ) => { if (err) { reject(err); @@ -3015,16 +4628,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodAdTagDetails with error', async () => { + it('invokes listSlates with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3032,31 +4645,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listVodAdTagDetails = stubSimpleCall( + client.innerApiCalls.listSlates = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listVodAdTagDetails(request), expectedError); + await assert.rejects(client.listSlates(request), expectedError); const actualRequest = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listVodAdTagDetails as SinonStub + client.innerApiCalls.listSlates as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listVodAdTagDetailsStream without error', async () => { + it('invokes listSlatesStream without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3064,34 +4677,33 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), ]; - client.descriptors.page.listVodAdTagDetails.createStream = + client.descriptors.page.listSlates.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVodAdTagDetailsStream(request); + const stream = client.listSlatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = - []; + const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { + (response: protos.google.cloud.video.stitcher.v1.Slate) => { responses.push(response); } ); @@ -3105,12 +4717,12 @@ describe('v1.VideoStitcherServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listSlates.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listVodAdTagDetails, request) + .calledWith(client.innerApiCalls.listSlates, request) ); assert( - (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listSlates.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3118,7 +4730,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('invokes listVodAdTagDetailsStream with error', async () => { + it('invokes listSlatesStream with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3126,24 +4738,25 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listVodAdTagDetails.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listVodAdTagDetailsStream(request); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSlates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listSlatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = - []; + const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { + (response: protos.google.cloud.video.stitcher.v1.Slate) => { responses.push(response); } ); @@ -3156,12 +4769,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listSlates.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listVodAdTagDetails, request) + .calledWith(client.innerApiCalls.listSlates, request) ); assert( - (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listSlates.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3169,7 +4782,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listVodAdTagDetails without error', async () => { + it('uses async iteration with listSlates without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3177,42 +4790,41 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + new protos.google.cloud.video.stitcher.v1.Slate() ), ]; - client.descriptors.page.listVodAdTagDetails.asyncIterate = + client.descriptors.page.listSlates.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = - []; - const iterable = client.listVodAdTagDetailsAsync(request); + const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; + const iterable = client.listSlatesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) + (client.descriptors.page.listSlates.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3220,7 +4832,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listVodAdTagDetails with error', async () => { + it('uses async iteration with listSlates with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3228,33 +4840,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListSlatesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listVodAdTagDetails.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVodAdTagDetailsAsync(request); + client.descriptors.page.listSlates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listSlatesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = - []; + const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) + (client.descriptors.page.listSlates.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3263,8 +4876,8 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('listLiveAdTagDetails', () => { - it('invokes listLiveAdTagDetails without error', async () => { + describe('listLiveConfigs', () => { + it('invokes listLiveConfigs without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3272,40 +4885,39 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), ]; - client.innerApiCalls.listLiveAdTagDetails = - stubSimpleCall(expectedResponse); - const [response] = await client.listLiveAdTagDetails(request); + client.innerApiCalls.listLiveConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listLiveConfigs(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listLiveAdTagDetails without error using callback', async () => { + it('invokes listLiveConfigs without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3313,35 +4925,33 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), ]; - client.innerApiCalls.listLiveAdTagDetails = + client.innerApiCalls.listLiveConfigs = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listLiveAdTagDetails( + client.listLiveConfigs( request, ( err?: Error | null, - result?: - | protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] - | null + result?: protos.google.cloud.video.stitcher.v1.ILiveConfig[] | null ) => { if (err) { reject(err); @@ -3354,16 +4964,16 @@ describe('v1.VideoStitcherServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listLiveAdTagDetails with error', async () => { + it('invokes listLiveConfigs with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3371,31 +4981,31 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listLiveAdTagDetails = stubSimpleCall( + client.innerApiCalls.listLiveConfigs = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listLiveAdTagDetails(request), expectedError); + await assert.rejects(client.listLiveConfigs(request), expectedError); const actualRequest = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listLiveAdTagDetails as SinonStub + client.innerApiCalls.listLiveConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listLiveAdTagDetailsStream without error', async () => { + it('invokes listLiveConfigsStream without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3403,34 +5013,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), ]; - client.descriptors.page.listLiveAdTagDetails.createStream = + client.descriptors.page.listLiveConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listLiveAdTagDetailsStream(request); + const stream = client.listLiveConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.LiveConfig[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { + (response: protos.google.cloud.video.stitcher.v1.LiveConfig) => { responses.push(response); } ); @@ -3444,12 +5054,12 @@ describe('v1.VideoStitcherServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listLiveConfigs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) + .calledWith(client.innerApiCalls.listLiveConfigs, request) ); assert( - (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listLiveConfigs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3457,7 +5067,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('invokes listLiveAdTagDetailsStream with error', async () => { + it('invokes listLiveConfigsStream with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3465,24 +5075,24 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listLiveAdTagDetails.createStream = + client.descriptors.page.listLiveConfigs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listLiveAdTagDetailsStream(request); + const stream = client.listLiveConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.LiveConfig[] = []; stream.on( 'data', - (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { + (response: protos.google.cloud.video.stitcher.v1.LiveConfig) => { responses.push(response); } ); @@ -3495,12 +5105,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listLiveConfigs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) + .calledWith(client.innerApiCalls.listLiveConfigs, request) ); assert( - (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + (client.descriptors.page.listLiveConfigs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3508,7 +5118,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listLiveAdTagDetails without error', async () => { + it('uses async iteration with listLiveConfigs without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3516,42 +5126,41 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + new protos.google.cloud.video.stitcher.v1.LiveConfig() ), ]; - client.descriptors.page.listLiveAdTagDetails.asyncIterate = + client.descriptors.page.listLiveConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = - []; - const iterable = client.listLiveAdTagDetailsAsync(request); + const responses: protos.google.cloud.video.stitcher.v1.ILiveConfig[] = []; + const iterable = client.listLiveConfigsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub + client.descriptors.page.listLiveConfigs.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) + (client.descriptors.page.listLiveConfigs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3559,7 +5168,7 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); - it('uses async iteration with listLiveAdTagDetails with error', async () => { + it('uses async iteration with listLiveConfigs with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3567,20 +5176,20 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + '.google.cloud.video.stitcher.v1.ListLiveConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listLiveAdTagDetails.asyncIterate = + client.descriptors.page.listLiveConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLiveAdTagDetailsAsync(request); + const iterable = client.listLiveConfigsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = + const responses: protos.google.cloud.video.stitcher.v1.ILiveConfig[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -3588,12 +5197,12 @@ describe('v1.VideoStitcherServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub + client.descriptors.page.listLiveConfigs.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) + (client.descriptors.page.listLiveConfigs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3601,9 +5210,8 @@ describe('v1.VideoStitcherServiceClient', () => { ); }); }); - - describe('listSlates', () => { - it('invokes listSlates without error', async () => { + describe('getOperation', () => { + it('invokes getOperation without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3611,39 +5219,81 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + new operationsProtos.google.longrunning.GetOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - ]; - client.innerApiCalls.listSlates = stubSimpleCall(expectedResponse); - const [response] = await client.listSlates(request); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - - it('invokes listSlates without error using callback', async () => { + it('invokes getOperation with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3651,33 +5301,43 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + new operationsProtos.google.longrunning.CancelOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - ]; - client.innerApiCalls.listSlates = - stubSimpleCallWithCallback(expectedResponse); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSlates( + client.operationsClient.cancelOperation( request, + undefined, ( err?: Error | null, - result?: protos.google.cloud.video.stitcher.v1.ISlate[] | null + result?: protos.google.protobuf.Empty | null ) => { if (err) { reject(err); @@ -3689,49 +5349,34 @@ describe('v1.VideoStitcherServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); }); - - it('invokes listSlates with error', async () => { + it('invokes cancelOperation with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + new operationsProtos.google.longrunning.CancelOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSlates = stubSimpleCall( + client.operationsClient.cancelOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listSlates(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listSlates as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); }); - - it('invokes listSlatesStream without error', async () => { + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3739,162 +5384,119 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + new operationsProtos.google.longrunning.DeleteOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() - ), - ]; - client.descriptors.page.listSlates.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listSlatesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; - stream.on( - 'data', - (response: protos.google.cloud.video.stitcher.v1.Slate) => { - 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.listSlates.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listSlates, request) + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); assert( - (client.descriptors.page.listSlates.createStream as SinonStub) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('invokes listSlatesStream with error', async () => { + it('invokes deleteOperation without error using callback', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + new operationsProtos.google.longrunning.DeleteOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSlates.createStream = stubPageStreamingCall( - undefined, - expectedError + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); - const stream = client.listSlatesStream(request); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; - stream.on( - 'data', - (response: protos.google.cloud.video.stitcher.v1.Slate) => { - responses.push(response); + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listSlates.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listSlates, request) + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); assert( - (client.descriptors.page.listSlates.createStream as SinonStub) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('uses async iteration with listSlates without error', async () => { + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] + new operationsProtos.google.longrunning.ListOperationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new operationsProtos.google.longrunning.ListOperationsResponse() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new operationsProtos.google.longrunning.ListOperationsResponse() ), generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.Slate() + new operationsProtos.google.longrunning.ListOperationsResponse() ), ]; - client.descriptors.page.listSlates.asyncIterate = + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; - const iterable = client.listSlatesAsync(request); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); - assert( - (client.descriptors.page.listSlates.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); - - it('uses async iteration with listSlates with error', async () => { + it('uses async iteration with listOperations with error', async () => { const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3902,39 +5504,26 @@ describe('v1.VideoStitcherServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + new operationsProtos.google.longrunning.ListOperationsRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.video.stitcher.v1.ListSlatesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSlates.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listSlatesAsync(request); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); - assert( - (client.descriptors.page.listSlates.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); }); @@ -4082,6 +5671,71 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); + describe('liveConfig', () => { + const fakePath = '/rendered/path/liveConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + live_config: 'liveConfigValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.liveConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.liveConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('liveConfigPath', () => { + const result = client.liveConfigPath( + 'projectValue', + 'locationValue', + 'liveConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.liveConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLiveConfigName', () => { + const result = client.matchProjectFromLiveConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.liveConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLiveConfigName', () => { + const result = client.matchLocationFromLiveConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.liveConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLiveConfigFromLiveConfigName', () => { + const result = client.matchLiveConfigFromLiveConfigName(fakePath); + assert.strictEqual(result, 'liveConfigValue'); + assert( + (client.pathTemplates.liveConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('liveSession', () => { const fakePath = '/rendered/path/liveSession'; const expectedParameters = {